-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Description
Every time I rename a file or create a new one, I have to restart TS server because my tsconfig.json doesn't apply on that file.
VScode (or typescript, i'm not sure) does not consider the file as part of project
Vscode Version 1.23.0
MacOS 10.13.4
Typescript 2.8.3
Steps to reproduce
- Open TS project with
tsconfig.jsonin project root (TS module resolution and custom config working on all files) - create new file/rename existing file
- exec "Typescript: Go to project configuration" and you I see the error below
If I click "configure tsconfig.json" it opens up my tsconfig.json just fine
I checked TS server log, and this is part relates
Info 1388 [13:25:35.879] -----------------------------------------------
Info 1388 [13:25:35.879] Open files:
Info 1388 [13:25:35.879] FileName: /Volumes/projects/myproject/app/index.ts ProjectRootPath: /Volumes/projects/myproject
Info 1388 [13:25:35.879] Projects: /Volumes/projects/myproject/tsconfig.json
Info 1388 [13:25:35.879] FileName: /Volumes/projects/myproject/app/renamed.tsx ProjectRootPath: /Volumes/projects/myproject
Info 1388 [13:25:35.879] Projects: /dev/null/inferredProject3*
My tsconfig:
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": [
"es2017",
"dom"
],
"moduleResolution": "node",
"jsx": "preserve",
"baseUrl": "./app",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"noErrorTruncation": true,
"paths": {
"*": ["*", "app/*"]
}
},
"typeAcquisition": {
"enable": true
},
}Tried with extensions disabled. Issue persists
Reloading window or restarting ts server fixes this issue. I'm hoping someone has an idea how to fix this or what causes this? I've seen some other issues about this issue but they seem to have been fix and some fixes mentioned in comments don't apply to me (e.g. I do not have a "files" key in mytsconfig)
