Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Please specify npm or yarn package" in PhpStorm/WebStorm when trying to install a new NPM package

Trying to add a new package I get the error below:

enter image description here

Going over settings everything looks good:

enter image description here enter image description here

Any suggestions where to look next?

like image 423
Eugene van der Merwe Avatar asked Dec 25 '16 05:12

Eugene van der Merwe


People also ask

How do I show npm scripts in Webstorm?

Press Shift twice to open the search window, start typing your query, for example, npm scripts , and select Show npm scripts from the list.

How do I update node in Webstorm?

Enable Live EditPress Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Debugger | Live Edit. Select Update Node.


1 Answers

You need to specify the path to npm.

go to settings->Languages and Frameworks->Node.js and NPM and click on the ... alongside Node interpreter and then click on ... beside npm package and give the path to npm, in my case it is /usr/lib/nodejs/npm.

enter image description here

like image 181
Rahul Kumar Avatar answered Sep 30 '22 23:09

Rahul Kumar