Webstorm throws an error when trying to run a command specified in package.json:
\"devDependencies\": {},
\"scripts\": {
\"dev\": \"./node_modu
Try changing your NPM patch no /usr/share/npm. This works for me.
I have fixed this problem by update the latest version of nodejs
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
Just update Webstorm to 2018.3. Problem solved
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
In Linux/Ubuntu: One of the reasons why webstorm throws this error is because of false directory names for node interpreter ("Run > Edit configurations > Defaults> npm > node interpreter").
In the recent node installation the default node interpreter directory is usr/bin/nodejs instead of usr/bin/node.
So, correct the node interpreter from "usr/bin/node" to "usr/bin/nodejs" and it works fine.