You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary tsconfig.json sometimes does not show up in VSCode's file list, nor does Typescript intellisense acknowledge it, despite its existence on disk. This behavior persists between VSCode restarts.
Behavior details
Begin on branchA with no changes. branchB has similar files to branchA including tsconfig.json, which is identical between both branches.
git checkout branchB // Checkout successful
git status // shows no files changed.
VSCode gives me arcane errors about needing to specify the module flag for Typescript. tsconfig.json does not show up in the list of files in VSCode.
ls // shows tsconfig.json
Opening a file explorer also shows tsconfig.json.
I restart VSCode, tsconfig.json is still not listed in VSCode despite existing on the file system.
I create a new tsconfig.json in VSCode. It lets me do it with no errors. tsconfig.json now finally shows up in VSCode. It's a blank file. Then:
git status
On branch branchB
Your branch is up-to-date with 'origin/branchB'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: tsconfig.json
no changes added to commit (use "git add" and/or "git commit -a")
Weird, because tsconfig.json was unchanged before. Let me reset to the head again.
git reset --hard HEAD
HEAD is now at 765b7b9 Some commit message
VSCode now updates tsconfig.json from disk properly and it's in the file list again.
git status
On branch branchB
Your branch is up-to-date with 'origin/branchB'.
nothing to commit, working directory clean
OK, this is where I wanted to be in the first place.
Just for good measure, I type some changes to let VSCode's Typescript intellisense do its thing. I delete the changes after a few seconds, and reassure myself with the following again:
git status
On branch branchB
Your branch is up-to-date with 'origin/branchB'.
nothing to commit, working directory clean
tsconfig.json is still there. Good.
git checkout branchA
Switched to branch 'branchA'
Your branch is up-to-date with 'origin/branchA'.
tsconfig.json is there. Looks fine.
git checkout branchB
Switched to branch 'branchB'
Your branch is up-to-date with 'origin/branchB'.
tsconfig.json is again perfectly fine, as it should have always been. But I definitely witnessed the behavior detailed above.
Final thoughts
I can understand tsserver.js locking files causing problems, but not tsconfig.json completely disappearing from VSCode's file list even after restarts when it is clearly there on the disk itself. It's like VSCode is completely ignoring tsconfig.jsonsometimes.
The text was updated successfully, but these errors were encountered:
@bpasero I had a hard time fully understanding the issue here. Gave it to you since it seems that the problem is that tsconfig.json is not shown in the explorer. Feel free to fwd.
@bpasero: I actually never tried refreshing VSCode's file list, but I did restart VSCode which still did not list tsconfig.json. To be clear, tsconfig.json was present on the file system this entire time.
If this happens again I'll try refreshing the file list instead.
@Penryn no a restart is fine too. This is weird, even if the file is locked by some other process, asking its parent folder for its children should return it. Any ideas what could go on? Something in the console (from Help menu) maybe?
Possibly related to:
Summary
tsconfig.json
sometimes does not show up in VSCode's file list, nor does Typescript intellisense acknowledge it, despite its existence on disk. This behavior persists between VSCode restarts.Behavior details
Begin on
branchA
with no changes.branchB
has similar files tobranchA
includingtsconfig.json
, which is identical between both branches.VSCode gives me arcane errors about needing to specify the module flag for Typescript.
tsconfig.json
does not show up in the list of files in VSCode.Opening a file explorer also shows
tsconfig.json
.I restart VSCode,
tsconfig.json
is still not listed in VSCode despite existing on the file system.I create a new
tsconfig.json
in VSCode. It lets me do it with no errors.tsconfig.json
now finally shows up in VSCode. It's a blank file. Then:Weird, because
tsconfig.json
was unchanged before. Let me reset to the head again.VSCode now updates
tsconfig.json
from disk properly and it's in the file list again.OK, this is where I wanted to be in the first place.
Just for good measure, I type some changes to let VSCode's Typescript intellisense do its thing. I delete the changes after a few seconds, and reassure myself with the following again:
tsconfig.json
is still there. Good.tsconfig.json
is there. Looks fine.tsconfig.json
is again perfectly fine, as it should have always been. But I definitely witnessed the behavior detailed above.Final thoughts
I can understand
tsserver.js
locking files causing problems, but nottsconfig.json
completely disappearing from VSCode's file list even after restarts when it is clearly there on the disk itself. It's like VSCode is completely ignoringtsconfig.json
sometimes.The text was updated successfully, but these errors were encountered: