microsoft / microsoft/TypeScript
project reference resolution fails when workspace is opened through a symlinked root path
@andrewbranch y travaille déjà.
Depuis le 6/5/2026.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 132
Description
Summary
When a workspace is opened through a symlinked root path, tsgo language service can report TS2307 for packages that should resolve through project references.
In our case:
- Opening the repo via
/data00/home/my-username/my-projectworks - Opening the same repo via
/home/my-username/my-projectfails /home/my-usernameis a symlink to/data00/home/my-username
The failing diagnostic is:
Cannot find module '@my-project/base' or its corresponding type declarations.ts(2307)
Environment
tsgolanguage service- Linux
- Workspace root opened through a symlink
- Example symlink:
/home/my-username -> /data00/home/my-username
Actual behavior
When opening a file through the symlinked workspace path, module resolution fails for a package that should resolve via project references.
Example:
- Works:
/data00/home/my-username/my-project/... - Fails:
/home/my-username/my-project/...
Expected behavior
The same workspace should resolve project-reference-backed packages identically whether it is opened through:
- the real path
- a symlinked root path
Minimal reproduction
A minimal regression test was added that reproduces the issue with:
- a workspace root exposed through a symlink
- an app project
- a referenced package project
- a
node_modulessymlink from the app to the package - a package
typesentry pointing at a generated.d.tsoutput that does not exist on disk
Behavior before the fix:
- opening through realpath resolves successfully
- opening through workspace-root symlink fails with
TS2307
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.