Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code TypeScript started failing with "To enable project-wide ... language features, exclude large folders..." #53492

Closed
trusktr opened this issue Mar 24, 2023 · 19 comments
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@trusktr
Copy link
Contributor

trusktr commented Mar 24, 2023

Bug Report

I was fine yesterday, and between then and today at some point VS Code starts to always show me the error

To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.

🔎 Search Terms

^ the error above

🕗 Version & Regression Information

  • This is a crash No

  • This changed between versions ______ and _______

Here's my version as of today:

Version: 1.76.2 (Universal)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:54:09.061Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.3.0
Sandboxed: Yes
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

This just started happening today. I was fine before today. Nothing has changed in the project, I have not pulled new code today, and now VS Code will not load Intellisense features, showing a tooltip with that message:

Screenshot 2023-03-24 at 12 42 01 PM

I tried adding exclusions (didn't have to before) but no luck. Warning persists.

  • I was unable to test this on prior versions because time_

⏯ Playground Link

N/A

💻 Code

N/A

🙁 Actual behavior

The warning

🙂 Expected behavior

No warning

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Mar 24, 2023
@RyanCavanaugh
Copy link
Member

@mjbvz any ideas what might have changed?

@trusktr
Copy link
Contributor Author

trusktr commented Mar 26, 2023

Is there some sort of numerical limit that prevents VS Code TypeScript features from turning on (similar to how other things like folding, syntax, etc, are disabled for large files)? If so, has that changed recently? And is there an option to turn off the limit?

@mjbvz
Copy link
Contributor

mjbvz commented Mar 27, 2023

We haven't seen other users reporting this on the VS Code side. @trusktr What version did you update from?

@rkstar
Copy link

rkstar commented Mar 31, 2023

i just updated to 1.77 this morning and started getting this same error. vscode no longer seems to know about my global typedefs

To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.
Version: 1.77.0 (Universal)
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T09:57:11.797Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.3.0
Sandboxed: Yes

@falldowngoboone
Copy link

falldowngoboone commented Apr 19, 2023

I'm seeing this as well. Just started today after updating to 1.77.3.

I am not using TypeScript, but there is a jsconfig in our project.

@rkstar
Copy link

rkstar commented Apr 19, 2023

for me... it was after i had ran expo build:web which created a massive web-build directory. i added that dir to my exclude list in tsconfig.json and everything was right with the world.

@JustinPierce
Copy link

JustinPierce commented May 10, 2023

I started seeing this issue earlier this week when our organization installed the GitHub Copilot extension. I don't know what the conflict is, but I can reliably resolve the issue by disabling Copilot in my IDE. I'm apparently the only one on my team seeing the issue at the moment, but it definitely seems to be related to Copilot.

Adding an aggressive list of includes to jsconfig.json allows Intellisense to load, but it takes a long time (several minutes) and seems really flaky. I'll regularly see the "initializing JS/TS features" message in the info bar, and Intellisense will not function while that is happening.

[Update] In my case, this appears to be an issue that was introduced in v1.85.75 of the Copilot extension for VSCode. Reverting to the version before that makes the issue go away. I believe my situation is entirely unrelated to the TS server, but maybe this will help someone.

@mindbrave
Copy link

I had the same problem for quite some time now, but I had it only in one project where I am working on few different project and what was interesting is that it was the smallest project, like just a bunch of files for some experiments.
I found out that I had "allowJs": true in tsconfig so it was also checking all js files, so I started to look for a big js file. It turned out it was bundle file that I was building using webpack, when I excluded that bundle file then error disappeared.

@ruinobreferreira
Copy link

Although I very aggressively tried to exclude everything I could, I still have the warning.

More annoying than the warning is not having a proper autocomplete.

@Ajdija
Copy link

Ajdija commented Dec 13, 2023

Same issue, exclude "*" resolves the warning, but even listing all hidden and non-hidden files individually is not helping. Of course "*" is not an option - no autocomplete.

@AbhiBhutani
Copy link

Had to exclude some folders to get it working again.

@canopus1io
Copy link

to find the list of files included

  1. enable logging:
    Screenshot from 2024-01-03 14-39-30

  2. check typescript output for log file name
    Screenshot from 2024-01-03 14-41-34

in that file should be enough to find the problematic directory or identify file path issues, in my case it was my javascript build directory (bundles)
and you can add excludes for them in your jsconfig.json or tsconfig.json

andrewHEguardian added a commit to guardian/support-admin-console that referenced this issue Feb 5, 2024
@mschipperheyn
Copy link

This has suddenly started happening for us. Huge blocker. Concerned to see this open for a year already without solution or workaround.

@RyanCavanaugh
Copy link
Member

We need a way to reproduce the problem to investigate it. It'd be great if someone could provide one.

@armenr
Copy link

armenr commented Mar 29, 2024

This randomly started hitting us, and as a result, intellisense and everything useful is broken AF.

Happening on a totally-working NuxtJS project, in both vscode and code-insiders.

Lucky for me, I have a JetBrains license....but this is really, unworkably bad. And I say this after spending HOURS trying to exclude stuff, tweak settings, check TypeScript server logs, etc.

Having your IDE malfunction is probably the single-most productivity-impacting problem you can have.

This is happening for basically EVERY file in our project:

``` 2024-03-29 16:05:21.522 [error] Error: TypeScript Server Error (5.3.2) Could not find source file: '/Users/x3r0/Development/amplify-testlab/hyeconnect-v2/composables/useFetchPosts.ts'. Error: Could not find source file: '/Users/x3r0/Development/amplify-testlab/hyeconnect-v2/composables/useFetchPosts.ts'. at getValidSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:144799:22) at getEncodedSemanticClassifications3 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:145319:77) at XA.e.getEncodedSemanticClassifications (/Users/x3r0/.vscode/extensions/vue.volar-2.0.8/node_modules/typescript-vue-plugin-bundle/index.js:2:19036) at e.getEncodedSemanticClassifications (/Users/x3r0/.vscode/extensions/vue.volar-2.0.8/node_modules/typescript-vue-plugin-bundle/index.js:451:20951) at IpcIOSession.getEncodedSemanticClassifications (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:183735:41) at encodedSemanticClassifications-full (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:183038:43) at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:185377:69 at IpcIOSession.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:185369:14) at IpcIOSession.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:185377:29) at IpcIOSession.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:185419:51) at process. (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:187001:14) at process.emit (node:events:514:28) at emit (node:internal/child_process:937:14) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) at Function.create (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:2:503003) at v.dispatchResponse (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:2:496983) at v.dispatchMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:2:495837) at ChildProcess. (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:2:495330) at ChildProcess.emit (node:events:514:28) at emit (node:internal/child_process:937:14) at processTicksAndRejections (node:internal/process/task_queues:83:21)
</details>

@RyanCavanaugh
Copy link
Member

RyanCavanaugh commented Mar 29, 2024

I'm really sorry that people are encountering problems, but if we don't have a way to reproduce the problem, we have ~zero chance of fixing it.

@prafed
Copy link

prafed commented Apr 3, 2024

I am having constant issues with VSCode doing this and becoming unresponsive. Anytime I do a build of our packages in our monorepo VSCode goes unresponsive and unusable .... the only solution is hard restart of the app.

I've tried this with all extensions disabled

@RyanCavanaugh
Copy link
Member

That's very unfortunate. We need a way to reproduce the problem so that we can fix it. Can you help?

@microsoft microsoft locked as resolved and limited conversation to collaborators Apr 11, 2024
@RyanCavanaugh
Copy link
Member

Locking / closing due to lack of repro. If you're seeing this, please log a new issue

including enough information to reproduce the problem

and we'll be happy to investigate. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests