Webstorm - Hangs when searching for NPM Packages

Just downloaded Webstorm 8 and created a node.js express project.  I wanted to install a package so I want to Preferences -> Node.js and NPM and clicked the Install Package button.  The Available Packages screen comes up with a spinner indicating a search is in progress but from there the application hangs.  Also downloaded and tried on 9 EAP with the same results.  This is on OSX Maverick.  Probably something on my end... looking at permissions now but any input would be appreciated.

Regards,
Steve

17 comments
Comment actions Permalink

Please can you attach your idea.log and thread dumps taken when it hangs? See https://intellij-support.jetbrains.com/entries/23348667-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond for instructions

0
Comment actions Permalink

I have exactly the same issue on windows 8.1 with WebStorm
Nodejs: 0.11.3
Npm: 1.4.26

the command that the Nodejs plugin use is : npm search
without any argument, and it never return any result even from command line.

I didn't have any issues with Nodejs 0.10.4

0
Comment actions Permalink

Yep, my log file points to the same thing.  The IDE is calling npm search without a parameter and there is apparently a known memory issue even if one is passed:

https://github.com/npm/npm/issues/3867

I'm new to node and Webstorm... trying to work my head around the simplest workflow to kickstart an express project without abstracting the process way with something like Yeoman/Bower.  About to test it, but it would be great if the package.json file worked like PyCharm's requirements file... add a new dependency/version and have the IDE offer to download it into a cache of project-specific packages.

0
Comment actions Permalink

just open the built-in terminal and run 'npm install' there after adding a new dependency to package.json.
See also http://youtrack.jetbrains.com/issue/WEB-8776

0
Comment actions Permalink

Stil not working... I have the same issue on Mavericks and Yosemite. NPM activity is 100% CPU load, must definiteley something with the plugin or phpStorm itself, because using terminal with npm or node is fine.

0
Comment actions Permalink

Do you mean that running 'npm search' (without parameters) in terminal doesn'rt show up any problems?

0
Comment actions Permalink

Running npm search does only show a blinking cursor, no text output, and my mac shows an activity for npm of 100% cpu. The npm plugin used from phpstorm still shows the spinning wheel.

0
Comment actions Permalink

Also the same problem with Webstorm 8 Trial or 9.EAP under Windows or OSX

npm search without parameters produces an Tread with 100% processor load the remains permanently

0
Comment actions Permalink

Well... don't know how it's related, but:

Windows 7 x64; nodejs v0.10.31 x64; npm 1.4.23

"npm search" when executed in Windows console (not even IDE one) .. just kind of hangs:

  • running for over an hour with no visible changes
  • constant 25% CPU utilisation
  • consumed over 2GB of RAM (10-15KB or so more with each second)


screen01.png

P.S.
That "npm WARN Building the local index..." message is only shown if caches are cleared (npm cache clear) otherwise just blicking cursor is shown.

0
Comment actions Permalink

It just means that this is npm problem and not WebStorm one (as WebStorm executed 'npm search' when searching for packages in npm registry)

See https://github.com/npm/npm/issues/3867. The issue is quite old, but seems that the things got worse with the recent npm/node versions

0
Comment actions Permalink

Sorry but I npm search require a parameter for search.
A call without parameters does not make sense

...also wonders also about the meaning of the functionality of the NPM module?

0
Comment actions Permalink

npm search accepts a parameter, but doesn't require it.

npm search
command without parameters is used to show everything that's available - that is exacly the thing that is needed to list all available packages
0
Comment actions Permalink

But this effectively breaks a very useful acpect of the nodejs integration.  Shouldn't they come up with a workaround or workaround instructions for customers?  It could also be documented as broken until this issue is resolved on the documentation page even if they don't want to come up with a workaround, right?

0
Comment actions Permalink

Please try out WebStorm 9. The issue should be fixed there. https://youtrack.jetbrains.com/issue/WEB-13370

0
Comment actions Permalink

That issue implies the search completes, the dialog populates, but the process remains.  In this case the dialog doesn't ever populate, from what I'm reading.

I could be wrong though.  If I'm mistaken, is this resolved in the plugin?  Should I be able to update the plugin in phpstorm to get it to work?

0
Comment actions Permalink

Yes, this is resolved in NodeJS plugin: "Available Packages" dialog shows the list of all packages.
I see your confusion: the issue description doesn't state explicitly whether the dialog populates or not. Anyway, it was fixed.
The fixed NodeJS plugin isn't compatible with PhpStorm 8.0.1. It targets PhpStorm 8.0.2 or higher. Now you can install the fixed NodeJS plugin in PhpStorm 8.0.2 EAP to check it out.
http://blog.jetbrains.com/phpstorm/2014/11/phpstorm-8-0-2-rc2-139-425/

0
Comment actions Permalink

Confirming that installing the EAP version and updating the plugin to the latest version results in the issue being resolved. Thank you very much for the assitance.

0

Please sign in to leave a comment.