TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Auto import suggests long node_modules path instead of just the package name #1489

Closed ukaaa closed 5 years ago

ukaaa commented 5 years ago

For some time now, whenever I add a node module import, e.g. Observable, and I do CTRL+Enter to show intentions, it suggests to import it from ../../node_modules/rxjs. But what I actually want is that it simply suggests to import it from rxjs.

Any idea what caused a change in the intentions? Is it a local setting? It's so annoying.

lierdakil commented 5 years ago

Hi. Sorry for the prolonged silence. Import suggestions are given to us by the TypeScript server, so the first thing to check would be your tsconfig.json. Also, check your TypeScript version -- it might be a bug that has since been fixed.

If you can't pinpoint the issue, try to construct a more or less minimal testcase. FWIW, I did not notice anything like this going on with my projects.

ukaaa commented 5 years ago

Sorry for the even longer prolonged silence. I have taken some time to investigate and updating to Typescript 3 seems to have fixed the suggested import paths.