WebStorm - error: Please specify npm package

On Ubuntu, if you have installed npm/nodejs via apt, use the /usr/share/npm folder for the npm package.

sudo apt-get install npm nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node

if you use Node Version Manager like me, it was a folder in which the bin folder was:

~/.nvm/versions/node/v8.9.1/lib/node_modules/npm

Ran into the same issue after upgrading from 11.0.3 to 2016.1. Not sure if some configuration was wrongly copied or if they added a new field to specify the npm package.

Go to

Run > Edit Configurations > Defaults > npm

Browse to select a Node interpreter, using the [...] button.

You should find the Npm package field, fill it with YOUR_PATH_TO_NODE/lib/node_modules/npm.

If it does not work right away, restart WebStorm so that it is taken into account.

Run/Debug Configurations > NPM screenshot


just want to add some reference. in my machine it's in /usr/share/npm so just fill that field with that.

Tags:

Npm

Webstorm