This is the config file for my typescript project:
{
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"outFile": "js/app.js"
},
"files": [
"src/main.ts",
"src/bootstrap.ts",
"libs/phaser.d.ts"
],
"exclude": [
"docs",
"css",
"index.html"
]
}
VS Code is giving me this error:
file: 'file:///e%3A/Programming/TypeScript/tsconfig.json' severity: 'Error' message: 'No inputs were found in config file 'e:/Programming/TypeScript/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["node_modules","bower_components","jspm_packages"]'.' at: '1,1' source: 'js'
I googled the Definition for the tsconfig file, but I couldn't find the source for this error. What am I doing wrong here? When compiling it with tsc, everything is fine.
I encountered a similar error (thrown by VS Code) and the solution for me was to add a .ts
extension to the file which serves as the entry point for my application. Typescript just needed something to compile ("an input").
Perhaps specifying the include path by adding
"include": [
'**/*'
]
to your tsconfig.json will take care of it?
Adding this to tsconfig.json
fixed it for me:
"compilerOptions": {
...
"rootDir": "./src",
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With