Skip to content

Auto-imports offered from another package’s node_modules #45784

Closed
@Kvek

Description

@Kvek

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

  • VS Code Version: Version: 1.60.0
  • OS Version: OS: Darwin x64 20.6.0

Steps to Reproduce:

  1. Open any .tsx file.
  2. type in useEffect | useRef | useState
  3. Click the autocomplete value.

Screenshot 2021-09-07 at 16 08 25

Screenshot 2021-09-07 at 16 08 59

The usual import path is @types/react/index.d.ts. It's now importing it from the file @types/react-transition-group/node_modules/@types/react/index. The @types/react option isn't event shown.

Another thing I noticed is the path is displayed as styled-jsx/node_modules/@types/react but when I click into this file it takes me to @types/react-transition-group/node_modules/@types/react/index, which has nothing to do with styled-jsx from what I can tell.

This is such a weird issue. It was working yesterday, but now it suddenly popped out of nowhere. Any help is much appreciated.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions