atom-import-js icon indicating copy to clipboard operation
atom-import-js copied to clipboard

Crash when trying to select which option to import from

Open hexsprite opened this issue 8 years ago • 6 comments

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.

hexsprite avatar Aug 27 '17 21:08 hexsprite

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.

trotzig avatar Aug 28 '17 17:08 trotzig

Atom 1.19.3 with atom-import-js 0.11.0

hexsprite avatar Aug 28 '17 18:08 hexsprite

Thanks. I'll give that combo a try.

trotzig avatar Aug 28 '17 18:08 trotzig

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.

trotzig avatar Aug 28 '17 20:08 trotzig

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.

hexsprite avatar Aug 30 '17 02:08 hexsprite

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!

trotzig avatar Aug 30 '17 16:08 trotzig