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

Error no project when certain folders are added to jsconfig.json #239

Open
aashish108 opened this issue Jan 22, 2024 · 5 comments
Open

Error no project when certain folders are added to jsconfig.json #239

aashish108 opened this issue Jan 22, 2024 · 5 comments

Comments

@aashish108
Copy link

aashish108 commented Jan 22, 2024

Hey team! Do you know why I get this error when adding some folders to jsconfig.json? I have a list of 10 folders included in jsconfig.json includes section and had to disable 4 folders to get find references to work.

TypeScript Server Error (5.3.3)\nNo Project.\nError: No Project

Complete Error

{
   "message":"<semantic> TypeScript Server Error (5.3.3)\nNo Project.\nError: No Project.\n    at Object.ThrowNoProject (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:175373:11)\n    at IpcIOSession.getProjects (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:184278:21)\n    at IpcIOSession.getReferences (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:184342:27)\n    at references (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:182868:43)\n    at /Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:185375:69\n    at IpcIOSession.executeWithRequestId (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:185367:14)\n    at IpcIOSession.executeCommand (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:185375:29)\n    at IpcIOSession.onMessage (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:185417:51)\n    at process.<anonymous> (/Users/aashishsharma/Library/Caches/Sublime Text/Package Storage/LSP-typescript/18.18.1/typescript-language-server/node_modules/typescript/lib/tsserver.js:186999:14)\n    at process.emit (node:events:517:28)\n    at emit (node:internal/child_process:944:14)\n    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)",
   "code":1
}
@rchl
Copy link
Member

rchl commented Feb 3, 2024

Probably would need at least some logs to be able to tell something. https://lsp.sublimetext.io/troubleshooting/#self-help-instructions

@silverwind
Copy link

silverwind commented May 16, 2024

I think the "No project" error is basically "too many large files" in the project and typescript-language-server just bails out. In VSCode, one would get such a warning during rename action where that bailout happens, urging users to configure exclude in tsconfig:

Ideally, LSP-typescript would replicate this warning popup in ST if the user has too many files in their project, likely not excluding dist and similar folders.

@silverwind
Copy link

silverwind commented May 16, 2024

I can reproduce the issue when I include a dist folder with 21MB of compiled Javascript in tsconfig.json. Not sure what the threshold is for typescript-language-server, but I assume it must have some limit and 21MB is over that.

@rchl
Copy link
Member

rchl commented May 16, 2024

Note to whoever wants to implement that: this message is based on projectLanguageServiceState tsserver event which has languageServiceEnabled property that tells whether the server got disabled.

@aashish108
Copy link
Author

Or it can probably be replicated with a lot of monorepo projects that have a lot of big apps in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants