Recently my VS Code seems to have a problem initializing my VueJs workspaces. When a .vue file is open VS Code displays "Initializing 'tsconfig.json'" in the the lower left-hand corner and it takes at least 20 minute if it finishes at all. Because of this all intellisense features (code completion, error display) do not work as well. I tried deleting the config folders in my profile (.vscode and AppData\Roaming\Code) and just installing the official Vue extension, but the problem persists.
I tried a couple of suggestions from articles / post with similar problem descriptions but none of those helped.
The issue occurs with all of my VueJS workspaces. On another computer the initialization is finished in less than a minute (same extensions, same version of VS Code).
How do I find out what causes this issue?
Additional info I found while researching this:
- Reinstall off VS Code (including deletion of the user data folders) did not help
- There is only one typescript version to choose from: 5.9.3 (although once for VS Code and once for the workspace, but this does not make a difference)
- This seems to be somehow related to the project folder being a network share. When I copy the folder to the local hard drive the initialization is much faster
All of this still does not explain, why is working fine on two other computers. I compared the tsserver logs and found something interesting. While the log messages themselves are more or less identical the computer showing the issues seems to pause the initialization for a couple of seconds once in while:
Working computer:
Info 99 [12:22:26.419] FileWatcher:: Added:: WatchInfo: c:/Users/user/.vscode/extensions/vue.volar-3.2.1/types/props-fallback.d.ts 500 undefined WatchType: Closed Script info
Info 100 [12:22:26.420] event:
{"seq":0,"type":"event","event":"createFileWatcher","body":{"id":30,"path":"c:/Users/user/.vscode/extensions/vue.volar-3.2.1/types/props-fallback.d.ts"}}
Info 101 [12:22:26.863] FileWatcher:: Added:: WatchInfo: //server.tld/web_projects/admin/src/locales/de.json 500 undefined WatchType: Closed Script info
Info 102 [12:22:26.863] event:
{"seq":0,"type":"event","event":"createFileWatcher","body":{"id":31,"path":"//server.tld/web_projects/admin/src/locales/de.json"}}
Not-working computer:
Info 99 [12:33:33.274] FileWatcher:: Added:: WatchInfo: c:/Users/user/.vscode/extensions/vue.volar-3.2.1/types/props-fallback.d.ts 500 undefined WatchType: Closed Script info
Info 100 [12:33:33.274] event:
{"seq":0,"type":"event","event":"createFileWatcher","body":{"id":30,"path":"c:/Users/user/.vscode/extensions/vue.volar-3.2.1/types/props-fallback.d.ts"}}
Info 101 [12:34:09.092] FileWatcher:: Added:: WatchInfo: //server.tld/web_projects/admin/src/locales/de.json 500 undefined WatchType: Closed Script info
Info 102 [12:34:09.092] event:
{"seq":0,"type":"event","event":"createFileWatcher","body":{"id":31,"path":"//server.tld/web_projects/admin/src/locales/de.json"}}
Why is there a pause of 36 seconds? I found other event longer pauses of 3 min, 33 secondes, 35 seconds, 3 min 17 seconds, e.g.:
Info 640 [12:38:18.840] FileWatcher:: Added:: WatchInfo: \\server.tld\web_projekte\admin\node_modules\vue-i18n\package.json 2000 {"excludeDirectories":["//server.tld/web_projekte/admin/node_modules","//server.tld/web_projekte/admin/**/node_modules","//server.tld/web_projekte/admin/dist","//server.tld0/web_projekte/admin/**/dist"]} Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution
Info 641 [12:41:35.474] FileWatcher:: Added:: WatchInfo: \\server.tld\web_projekte\node_modules\@types\node\package.json 2000 {"excludeDirectories":["//server.tld/web_projekte/admin/node_modules","//server.tld/web_projekte/admin/**/node_modules","//server.tld/web_projekte/admin/dist","//server.tld/web_projekte/admin/**/dist"]} Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution
On the other computer the pause is slightly over 1 second.
When I restart the TS server the details seem to occur on the same log entries with the same duration.