'Why typescript keep giving me No inputs were found in config file error?
Why typescript keep giving me No inputs were found in config file error?
When I use tsconfig.json in vscode, but when I try to build it, it gives me a 'No inputs were found in config file' error:
Terminal:
error TS18003: No inputs were found in config file '/Users/user/Desktop/projects/ts/.vscode/tsconfig.json'.
Specified 'include' paths were '["/Users/user/Desktop/projects/ts/mathweb/app.ts"]' and 'exclude' paths were '["/Users/user/Desktop/projects/ts/mathweb/app.ts"]'.
Found 1 error.
The terminal process "zsh '-c', 'tsc -p /Users/user/Desktop/projects/ts/.vscode/tsconfig.json'" failed to launch (exit code: 2).
Terminal will be reused by tasks, press any key to close it.
And I search on SO, and some answer told me to create a empty file, so I did:
But it doesn't work. Other answer told me to use rootDir at tsconfig.json, and I did, and also doesn't work.
It make me confused. I'm not familiar with typescript and I just want ts compile to specified directory, and that is what happened right now.
I'm using vscode ide, I'm not sure if that is IDE's problem,or could also be my fault
tsconfig:
{
"compilerOptions": {
"outDir": "/Users/user/Desktop/projects/ts/mathweb/app.ts",
"rootDir": "./mathweb"
},
"include": [
"/Users/user/Desktop/projects/ts/mathweb/app.ts"
]
,
"exclude": [
"/Users/user/Desktop/projects/ts/mathweb/app.ts"
]
}
Solution 1:[1]
include expects relative path so and you added app.ts in exclude
{
"compilerOptions": {
"outDir": ".",
"rootDir": "."
},
"include": [
"./app.ts"
]
}
Edit: as you don't have tsconfig on root dir try this
{
"compilerOptions": {
"outDir": "../dist",
"rootDir": "."
},
"include": [
"./../mathweb/"
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |