Why is vscode giving me the error "No Inputs where found in file tsconfig.json" when tsc found none?
Answer a question
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.
Answers
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?
更多推荐
所有评论(0)