Open kamnakis opened 1 year ago
Does this reproduce in the latest VS Code insiders build with all extensions disabled?
Does this reproduce in the latest VS Code insiders build with all extensions disabled?
Just checked! Yes it does!
Since this was moved in the TypeScript repository, let me share something I noticed while investigating on this error. Hope it helps.
Let's say I import a third party module (e.g. react-router-dom
) and the ./node_modules/react-router-dom
is a symlink folder.
Here is a video:
Typescript resolve the symlinked dependency (installed using pnpm
) but pins the resolved path to physical folders. for me this becomes an issue when a new version of the dependency is installed but TypeScript intellisense keeps pointing to the old version.
The only workaround I know is restarting VS Code. Is there a better / another workaround?
EDIT: Asking the question helps to think clearer. A better workaround is to restart just the typescript server
My issue seems to be fixed with Typescript v5.04
My issue seems to be fixed with Typescript v5.04
Just for the reference, mine issue is still there even with v5.04
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Here is a video of the issue https://user-images.githubusercontent.com/33131460/203819438-464d7205-ab57-4b96-8f88-4d38b916fca5.mp4
pnpm i
node_modules/react-router-dom/dist/index.d.ts
react-router
and@remix-run/router
are not resolved even though they are defined in the dependencies ofreact-router-dom
.I think the issue is happening because the
node_modules/react-router-dom
is a symlink and vs code looks at the copy and not the original folder.