Skip to content

Missing import suggestions (in *.tsx) for some components from node_modules (npm) #30906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrGibi opened this issue Mar 7, 2019 · 1 comment
Labels
Design Limitation Constraints of the existing architecture prevent this from being fixed

Comments

@mrGibi
Copy link

mrGibi commented Mar 7, 2019

  • VSCode Version: 1.31.1 & 1.32.0-insider; extensions disabled
  • TypeScript version: 3.3.1 & 3.4.0-dev.20190307
  • OS Version: macOs 10.14.3

VSCode doesnt find (?) and suggest importing SOME components installed from npm.
Examples when there are no import suggestions:

  • npm install @material-ui/core (type defs included)

zrzut ekranu 2019-03-07 18 44 33

^ no suggestions. If I `import {}` from this package suggestions are shown:

zrzut ekranu 2019-03-07 18 45 44

Another one:

  • npm install react-bootstrap (type defs included)

zrzut ekranu 2019-03-07 18 50 48

^ again, no suggestions, but if I `import {}`:

zrzut ekranu 2019-03-07 18 52 03

Exactly same with (for example) @fortawesome/react-fontawesome (FontAwesomeIcon component) (type defs included).

One example where import suggestion DOES show up:

  • npm install reactstrap (type defs not included)
  • npm install @types/reactstrap

zrzut ekranu 2019-03-07 18 48 08

^ suggestions are working as expected

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

@vscodebot vscodebot bot assigned mjbvz Mar 7, 2019
@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 12, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Apr 12, 2019

This sounds like the limitation described in #29039 (comment)

Package auto imports only start showing once there an existing reference to that package somewhere in the project

@mjbvz mjbvz removed their assignment Apr 12, 2019
@RyanCavanaugh RyanCavanaugh added the Design Limitation Constraints of the existing architecture prevent this from being fixed label Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Limitation Constraints of the existing architecture prevent this from being fixed
Projects
None yet
Development

No branches or pull requests

3 participants