Open bennyk8y opened 1 year ago
setting this in tsconfig.json
"exclude": ["**/node_modules", "node_modules"]
in every package in the monorepo should help?
Would you be able to provide us with a TSServer log from VS Code?
To do this, you'd need to:
Preferences: Open User Settings
Preferences: Open Workspace Settings
"typescript.tsserver.log": "verbose",
TypeScript: Open TS Server log
commandtsserver.log
file.âš Warning: A TSServer log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on GitHub, let us know and you can share the details privately.
@DanielRosenwasser Hi! I have it. Can i share it privately?
Sure, email Myfirstname dot Mylastname at microsoft dot com
(capitalization unfortunately matters)
Just to clarify, this is more of a suspiciously long-running thing/a startup hang - it's not causing an actual crash, right?
Yes, VSCode itself is not crashing, just TS features stop working after this happens, sometimes an error message pops with the message
The JS/TS language service crashed
Just to clarify, all our development team that works on that repo (the main monorepo of the company) suffers from it, TS crashes few times a day.
Really not sure how can help VSCode understand not to watch node_modules
, which i suspect affects the performance and maybe this somehow related to TS crashes.
But maybe the issue is not related to FileWatcher...
@DanielRosenwasser did you get the email?
@bennyk8y can you please try with latest vscode and nightly and see if this still repros and if yes please share the verbose log and way to repro this to investigate this. Thanks
Hi, I am using the latest VSCODE and typescript constantyl crashes in my monorepo. It works flawlesly with other non monorepo projects.
I followed your instructions, but the TS Log even after few minutes is huge. I scanned it and this is the error that keep repeating:
Err 15216 [14:58:30.541] Exception on executing command delayed processing of request 1542:
Cannot read properties of undefined (reading 'updateFromProject')
TypeError: Cannot read properties of undefined (reading 'updateFromProject')
at synchronizeHostData (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:148905:14)
at Object.getProgram (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:149084:5)
at getSource (/Users/30031005/Github/skillpies/node_modules/.pnpm/next@15.0.0-rc.0_@babel+core@7.24.7_babel-plugin-macros@3.1.0_react-dom@19.0.0-rc-c21bcd627b-_czrxpi2kri5ztqn2ft65hk2xum/node_modules/next/dist/server/typescript/utils.js:98:69)
at proxy.getSemanticDiagnostics (/Users/30031005/Github/skillpies/node_modules/.pnpm/next@15.0.0-rc.0_@babel+core@7.24.7_babel-plugin-macros@3.1.0_react-dom@19.0.0-rc-c21bcd627b-_czrxpi2kri5ztqn2ft65hk2xum/node_modules/next/dist/server/typescript/index.js:103:49)
at TemplateLanguageServiceProxy.adaptDiagnosticsCall (/Users/30031005/.vscode/extensions/styled-components.vscode-styled-components-1.7.8/node_modules/typescript-template-language-service-decorator/lib/template-language-service-decorator.js:288:33)
at Proxy.<anonymous> (/Users/30031005/.vscode/extensions/styled-components.vscode-styled-components-1.7.8/node_modules/typescript-template-language-service-decorator/lib/template-language-service-decorator.js:54:25)
at IpcIOSession.semanticCheck (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:189731:125)
at /Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:189792:14
at MultistepOperation.executeAction (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:188448:9)
at /Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:188421:71
at IpcIOSession.executeWithRequestId (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:191498:14)
at Object.executeWithRequestId (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:189477:57)
at Immediate._onImmediate (/Users/30031005/Github/skillpies/node_modules/.pnpm/typescript@5.5.1-rc/node_modules/typescript/lib/typescript.js:188421:28)
at process.processImmediate (node:internal/timers:480:21)
I can give you priveate access to my repo if needed. I would love to see where the error might originate ?
it seems like some plugin you have thats not handling things correctly as i dont see why you should run into this as its guarded correctly. https://github.com/microsoft/TypeScript/blob/3163fe7e3898c1f48cd9bc097b96e3426cd2a453/src/services/services.ts#L1683
Hi, in our company we are working in relatively big TS monorepo. For all our developers TS crashes few times a day. My setup:
Another thing that we've tried is excluding from File Watcher
node_modules/**
andnode_modules
but i see its still being watched under, but i guess its a different thing.Bug Report
🔎 Search Terms
typescript crash, typescript plugin loading infinitely
🕗 Version & Regression Information
The indications for this crash are