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
AutoImport showing multiple imports and always imports relative #53597
Comments
Please try upgrading your workspace to use |
I'm running into this same issue today after updating to the 1.25.0 release of VSCode, also in an Angular project (Angular v6+ running TS 2.8.4). @mjbvz After installing the latest version of typescript (TS 3.0.0-dev.20180705) the imports work correctly. Another thing of note that may be helpful, with TS 2.8.4 it seems that only libraries imported from the node_modules folder seem to be affected, all of my references defined in the |
@mjbvz After upgrading to |
I had a similar issue at hand after updating to the latest version of VSCode and using @mjbvz suggestion is working by upgrading the global version of typescript to |
I face the same issue after upgrading my VSCode to version 1.25.0. VSCode will auto edit all my imports, whenever I create new file within my workspace. |
The same issue for me. After upgrade all imports are suggested as relative to the path. |
Hi |
I have the same issue since I updated VS Code to the latest version today. Before the update, it was working as expected |
@Aeonrush did you update |
@andreyjamer Yes, its a hack but don't update |
@mainawycliffe |
Thank you for testing this. It sounds like the issue is generally fixed with typescript 3.0 which we will pick up for VS Code insiders soon and for VS Code 1.26. Closing as upstream. If you do not see this working when using typescript@next, please open a new issue |
@mjbvz |
We don’t adopt major TS versions in VS Code recovery releases because they have not been tested widely and introduce risk of regressions. Use insiders or upgrade Ts versions manually if this is blocking your work |
I was able to fix this issue by telling vs code to use my workspace version of TS (2.7.2) instead of VS Codes (2.9.2). Though that worked for me, seems like TS should be fixed and patched to 2.9.3 and vs code should release a fix with the fix for TS. This seems likes its breaking dev workflows and hitting productivity hard. |
Is anyone have vscode 1.24.x download link? I want to downgrade it. This seem like a breaking changes for me. I won't want to use |
Seems like the old links are all available through the blog for each month. Here's the May 2018 blog |
I configured VS Code to use the local installation of typescript (v2.7.2) instead of the global (v2.9.2) one and it works. |
You can do what @manospasj said by clicking on the version number at the bottom: |
Is it planned to resolve this issue with an official patch (instead of just changing the TS version)? It seems to be kind of a regression... 😞 |
This has been fixed in VS Code insiders. On the current version of VS Code, you can also upgrade your workspace to use Typescript 3.0. We did not backport the fix due to lack of testing, engineering cost, and concerns about causing other regressions. Locking this issue to make it clear that the issue is fixed in insiders and that a workaround exists for current version users. If you see this issue when using TS 3.0, please open a new issue |
Issue Type: Bug
See screen shot below, all my imports end up like this rather than expected
@angular/core
or whatever. Plus getting loads of additional imports listed and on may occasions does not even find my imports even though they are there and have to manually add themThis primarily when using Cmd+. but Ctrl+Space gives the same result
Steps to replicate
@NgModule()
NgModule
and press either Ctrl+Space or Cmd+.VS Code version: Code - Insiders 1.25.0-insider (0f080e5, 2018-07-04T14:06:34.850Z)
OS version: Darwin x64 17.6.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (19)
The text was updated successfully, but these errors were encountered: