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
Intellisense autoimport of React components not working #126914
Comments
I'm having the same problem, the correct completion are shown but the autoimport doesn't work. System info
|
Same issue here, and sometimes the proper imports don't show up at all - unless I close the intellisense and then In fact the one I ended up committing (the first suggestion) came from the wrong place - it used to properly default to import items from Often when I try to import React components from inside my project source I also get the first suggestion as some kind of 'shadow import' which has the right apparent typings but doesn't add an import line. (update: seems to only happen for stuff not in node_modules). If it matters, you can see I'm using TypeScript |
Can confirm, that's also a issue I'm facing. However I don't get those "shadow imports". For me it just shows it once, and that doesn't add imports. Also no "Auto-Import" - label shows on the suggestion for me, so I guess the entry does what it's supposed to do (which is nothing), but the Auto-Import entries don't show up. |
I faced this today. CleanShot.2021-06-27.at.01.12.17.mp4 |
Same here. This happens to me since last update. |
This is likely caused by microsoft/TypeScript#44657 and fixed by the related PR microsoft/TypeScript#44724. It is no longer apparent for me in |
I just pointed my project to |
Duplicate of microsoft/TypeScript#44657 |
Issue Type: Bug
I created a basic react app with the CRA utility and added another file Test.js:
While Intellisense recognizes this file and offers completion when I type
<T
somewhere else, it doesn't auto-import it, when selected.This also applies to installed components like Bootstrap for React or MDBReact. The correct completions are shown, but it doesn't import them.
It used to work, but today it suddenly doesn't work anymore. Neither on new projects nor on old ones, where it definitely did work. I don't recall updating VSCode, but I guess I did that recently, based on the version below. I also updated Node and NPM, should that be important.
VS Code version: Code 1.57.1 (507ce72, 2021-06-17T13:26:56.255Z)
OS version: Linux x64 5.4.0-73-generic snap
Restricted Mode: No
System Info
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Extensions (15)
A/B Experiments
The text was updated successfully, but these errors were encountered: