Microsoft/vscode
View on GitHubtypescript.tsdk not resolved correctly when it starts with the same name as the parent directory
Open
#272761 opened on Oct 22, 2025
bughelp wantedtypescript
Description
Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.105.1
- OS Version: Windows 11
Steps to Reproduce:
- Create a directory called
xand open it in VS Code - Create a
.vscode/settings.jsonwith"typescript.tsdk": "x/.yarn/sdks/typescript/lib" - Press
ctrl+shift+p, choose "Select TypeScript Version", then Pick "Use Workspace Version" - Note that the error message says
The path c:\path\to\x.yarn\sdks\typescript\lib\tsserver.js doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.
when it should should be c:\path\to\x\x\.yarn\sdks\typescript\lib\tsserver.js
Originally introduced in https://github.com/microsoft/vscode/commit/733e208be4cfa85e5a1b2e2ea415843f0a9a7b6d
Workaround: "typescript.tsdk": ".//x/.yarn/sdks/typescript/lib", note the double slash at the start.
I could submit a PR that deletes that code to solve it, but I don't understand what it's there for in the first place.
CC @mjbvz