-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
auto import not working properly #35792
Comments
Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue. Happy Coding! |
I have this issue as well. I try to import a type, which a package supplies, but it doesn't appear in the suggestions. The package is defined in the package.json as devDependency. TypeScript 3.7.3 (Also tried Nightly with same result) on Ubuntu 18.04. I've noticed this not working on multiple occasions with different packages. Some packages work, others don't. Not sure if there is anything with caching going on here. |
@IllusionMH i have created a video on that. please have a look |
For me it's a bit different:
|
I had the same problem since the update to VSC 1.41.0. In my case, it seams that the latest Typescript version (3.7.3) is causing the import problems. I resolved it by using an anterior TS version. I used the Typescript Workspace version (mine is 3.5.3) instead of VS Code's version (3.7.3). You can see/set it at the bottom-right of the VSC editor. Hope it can help. |
@SantoJambit looks it functions as designed in your case if "import from a dependency will not be suggested." is about dependency that is not in your As soon as you manually add import to your file - you add this module to your project tree and it will be treated as usually with auto-import functionality. @Tahir500 do you see "Initializing JS/TS language features" in the status bar after commenting out import and requesting suggestion? Looks like TS takes too much time to process updated project tree or hangs/crashes in process. To understand what goes wrong more info about project structure will be useful (or link to repo if it's in open access). /cc @andrewbranch |
Oh, I found delete update: update again: |
@Tahir500 Please share repo steps and code as text in addition to the videos |
@IllusionMH I am talking about direct dependencies. But I just tried using an older TS version with the same result, so maybe this is a vscode issue and not a typescript issue. Edit: It seems my issue is @types vs bundled types, as described here: https://github.com/microsoft/vscode/issues/88015 |
Issue Type: Bug
auto import is not working in the new udpate, it was working in the previous build
VS Code version: Code 1.41.0 (9579eda04fdb3a9bba2750f15193e5fafe16b959, 2019-12-11T17:59:52.065Z)
OS version: Windows_NT ia32 10.0.18363
here is a short video on that
https://drive.google.com/file/d/1inQ1yZGLSfxeXmGLcDl81nEsATyTrjik/view
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Extensions (5)
The text was updated successfully, but these errors were encountered: