Skip to content

Auto Import not working with node_modules #30033

Description

@KirillMetrik
  • VSCode Version: 1.31.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Unpack the attached source test-app.zip
  2. run npm install
  3. Open app.module.ts file
  4. Remove NgModule import (the @NgModule will be highlighted with an error)
  5. Place cursor on the @NgModule. Here expected behavior is that the light bulb would appear and suggest to add missing import. In reality nothing happens. I am still able to add import manually but it's impossible to use auto import feature for this. When entering import manually Intellisense works without any problems.

This might seem like a minor problem but the example is just a small extract from a big project. It seems that VSCode (or TS server) is not checking for possible typings in node_modules. In the end we have to add imports manually everywhere which is very time consuming and simply kills productivity.

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions