Repository navigation
Closed
Labels
Description
Type: Bug
I have a monorepo setup, using workspaces.
Whenever I rebuild one of my packages, all files in another workspace can no longer resolve types for it. That is until I do cmd + shift + P -> TS restart
VS Code version: Code 1.81.0 (Universal) (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:40:02.782Z)
OS version: Darwin arm64 21.4.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 7, 9, 9 |
| Memory (System) | 32.00GB (0.07GB free) |
| Process Argv | --crash-reporter-id 971cdb5c-5eac-4e31-85ae-d33323f572d4 |
| Screen Reader | no |
| VM | 0% |
Extensions (9)
| Extension | Author (truncated) | Version |
|---|---|---|
| postcss | css | 1.0.9 |
| vscode-eslint | dba | 2.4.2 |
| gitlens | eam | 14.2.1 |
| prettier-vscode | esb | 10.1.0 |
| vscode-jest-runner | fir | 0.4.66 |
| angular-console | nrw | 18.6.0 |
| vscode-stylelint | sty | 1.2.4 |
| vscode-mdx | uni | 1.4.0 |
| vscode-css-variables | vun | 2.6.3 |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30792226
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
vsctsb:30748421
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofa:30804715
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
e537b577:30795824
dsvsc013:30795093
dsvsc014:30804076
Reacted by Adrian Ordonez, Sam Lanning, sebastien-f, Alessandro Duico, Tristan P., Dexter Miguel, Jiří Brabec, Christian Benincasa, Louis Chan, Lennart and 6 more
Activity
vscodenpa commentedon Aug 17, 2023
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.81.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
gittymcgit commentedon Aug 17, 2023
Updated. still persists
mjbvz commentedon Aug 17, 2023
Please share a project which demonstrates the issue
gittymcgit commentedon Aug 18, 2023
https://github.com/gittymcgit/vs-code-bug-repro
Screen.Recording.2023-08-18.at.16.54.07.mp4
adrianord commentedon Aug 24, 2023
I'm facing the same issue using tsserver with neovim, also using pnpm workspaces. My set up is very similar to the above example repo, but using tsc directly instead of vite.
sheetalkamat commentedon Sep 13, 2023
Timur Zhidkov (@gittymcgit) the repro you shared doesnt work for me since when i open index.tsx, the import is not resolved.
Do i need any special setup apart form running
pnpm installDo you have any repro that doesnt involve pnpm.
Thanks
7 remaining items
sebastien-f commentedon Jan 31, 2024
Sheetal Nandi (@sheetalkamat) here is a repo that reproduce the issue : https://github.com/sebastien-f/vs-code-ts-server-needs-restart
Here is the tsserver.log
Steps to follow :
npm inpm run buildpackages/package2/src/index.ts, everything is fine (as expected)Also a video here (had to make 2 parts because of the recording software) :
In the second video I forgot to restart the TS Server at the end, but it solves the issue.
sheetalkamat commentedon Feb 2, 2024
sebastien-f thank you for the repro and the log, i am able to see the issue. Its to do with use watching
node_modulesand notnode_modules/package1for changes to resolution.r0ssIV commentedon Mar 27, 2024
Is this bug still not fixed? A year has passed - having same issue in VSCode 1.87.2
r0ssIV commentedon Mar 28, 2024
Sheetal Nandi (@sheetalkamat) do you have any info if it is issue with typescript or VSCode
Have created a tiny demo project showing the issue + brief description in README.md
https://github.com/rivaros/demo-ts-server-failure
p.s.: sebastien-f have you got it resolved? can see you are using workspaces, in my case it is a link tool https://github.com/privatenumber/link but the issue still is the same and is probably related to cleaning (rimraf, rf inside linked package)
sebastien-f commentedon Mar 28, 2024
I'm not working on that side project at the moment, but had a workaround with a keyboard shortcut (ctrl t+s) to reload TS.
kasvith commentedon Apr 2, 2024
im also facing the same issue, tsserver is crashing in a PNPM Monorepo(non shared tsconfig)
t-johansson commentedon Apr 3, 2024
Having the same issue in a PNPM monorepo, VSCode 1.87.2. Any time i build one of the internal packages i need to restart the TS server.
mastershadow commentedon Apr 3, 2024
Same here.