Can't find the npm installation folder, need it to configure Webstorm

I have WebStorm 2017.3.5 (latest).

When I tried to start webpack-devserver via npm tool window, i got this:

https://sun9-1.userapi.com/c840637/v840637862/6a549/2sR9sM209ps.jpg

“Please specify npm or yarn package”.

The interesting part is that when i run the same script via

npm run start

It works like a charm; but Webstorm refuses to do the same.
Okay, i started googling and found out that i need to specify npm root folder. The folder is


artyom@linux-09ga:/usr/bin> which npm  
/usr/bin/npm

So i tried “/usr/bin/npm”, “/usr/bin”, “/usr/bin/npm6”, “/usr” with no success, i keep getting “cannot find bin/npm-cli.js”.
https://sun9-2.userapi.com/c840637/v840637862/6a55a/yE2wo-8lzmw.jpg

Seems that i need to find the path to that file. Alright, i googled more and found the following command:


artyom@linux-09ga:/usr/bin> npm root -g   
/usr/local/lib/node_modules

And i tried again with that directory, but then i got “no such directory” message. I checked manually, and yes, /usr/local/lib is empty.

So basically my task now is to find the npm-cli.js file somehow. Does someone know where npm is installed to on SUSE?

Accidentally ran into the right path by checking every folder in root.

The path is

/usr/lib64/node_modules/npm6

People on the internet often find it in simular paths, like /usr/lib/something.
If you run into same problem, try to find node_modules directory in /usr/lib or usr/lib64, or their subfolders. According to people on the internet, paths could be… unusual, i’d say. Posting just in case someone comes from google.

Wouldn’t a simple

find / -name npm-cli.js

have showed you where it is?