Galooshi / atom-import-js

Atom plugin for ImportJS
MIT License
36 stars 3 forks source link

Crash when trying to select which option to import from #22

Open hexsprite opened 7 years ago

hexsprite commented 7 years ago

image

After I get this window when selecting either Fix All Imports or Import Word, the cursor will flash a single time and then the editor window will lock up and then Atom will say it crashed.

trotzig commented 7 years ago

Ouch.

Can you check what version you are on? We made some changes to the underlying import-js lib around how ambiguous imports are handled in 2.7.0, it was released in v0.11.0 of the atom plugin.

hexsprite commented 7 years ago

Atom 1.19.3 with atom-import-js 0.11.0

trotzig commented 7 years ago

Thanks. I'll give that combo a try.

trotzig commented 7 years ago

The same setup doesn't lead to any issues for me (I did however run into issues installing the atom-import-js plugin though, had to rebuild the package to make it work).

I wonder if there's something corrupt in your cache... Import-js will start a background process indexing all your modules and their exports. There is a way to clean this cache, I think it might be worth doing that. Either run npm install -g import-js && rm $(importjs cachepath) from the root of your project (same folder as where the package.json file is in). Or go to the tmp folder of your os and look for an importjs*.db file and just remove it. You'll have to restart atom after doing that.

I'm mainly using the vim plugin for import-js, apologies for not being completely up-to-date.

hexsprite commented 7 years ago

I tried clearing the cache. That didn't work. But I did disable some packages and that seemed to make the difference. I wasn't nearly as systematic as I could have been so I'm not sure exactly which one caused the problem but it seems solved for now. If I don't have any more problems I'll close this in a couple days. If I can figure out which are some likely incompatible packages I'll let you know as well.

trotzig commented 7 years ago

I understand. Often times, these things are hard to isolate. I'm glad you have a working setup though. And let us know if it starts happening again!