Skip to content

If node_modules folder or a subfolder (like with pnpm) is a symlink (under Windows), TypeScript auto imports do not work anymore  #36104

Closed
@stefanocke

Description

@stefanocke
  • VSCode Version: 1.41.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Copy some TypeScript project into a new folder
  2. There, replace node_modules directory by a symlink to the node_modules in the original TypeScript project
  3. Try to import something from node_modules in the copied project (for example, somethinf from @angular/core in an Angular project). The import will work (no compiler error), but there is no light bulb and no intellisense support for the import

More explanation:

  • We use symlinked node_modules to share them between multiple projects. It is our own solution, but tools like https://pnpm.js.org/ do similar things. So, other users might have the same issue.
  • I have not tested it under Linux yet. Only Win 10.
  • I have searched for similar issues with keyword "symlink", but I am not sure any of them matches.
  • I think it stopped working some months ago but unfortunately I cannot tell exactly. I am sure it worked in the past.

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions