[RESOLVED] Ubuntu / Languages & Frameworks > npm Not found
Hi there, PhpStorm is great, but I'm having an issue with npm not found:
My environment seems ok to me, example:
And, at "Package manager" field if I try to select by myself informing the path like "/usr/share/npm/bin" it doesn't work neither, nothing happens.
So... How can I get my npm package manager working in PhpStorm, any clue...?
My PhpStorm info:
PhpStorm 2018.1.5
Build #PS-181.5281.19, built on June 7, 2018
JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-31-generic
Thank you!
PS.: what I am really trying to do is just have my jQuery support enabled in PhpStorm, but first I need to get over the "Can not install Node.js module: Please specify npm or yarn package" error message when downloading TypeScript community stubs.
Please sign in to leave a comment.
Please try specifying a full path to npm package (like
/usr/local/lib/node_modules/npm
) in this field (note that it should be a package, not a binary,/usr/bin/npm
won't work. Normally npm is installed to{prefix}/lib/node_modules
, whereprefix
can be obtained vianpm config get prefix
Hi Elena, thank you for your reply, I hope I can get this working :-)
Unfortunately, it didn't work, I've still got red in the field, and looking at `/usr/local/lib/node_modules` the only content is the `bower` subfolder. Please take a look:
what is the result of running
npm config get prefix
?Hi, I've already put at previous image :-) I got /usr/local
Tks.
weird... please run
npm --help
and provide the full outputHi, here it goes, please also see after the output.
I was able to get the npm version 3.5.2 using "/usr/share/npm" at the Package manager field, good! But, still the IDE shows me the error message "Please specify npm or yarn package" when I try to install the "jquery" package, example:
>I was able to get the npm version 3.5.2 using "/usr/share/npm" at the Package manager field, good!
great, thanks for update:)
>But, still the IDE shows me the error message "Please specify npm or yarn package" when I try to install the "jquery" package
https://youtrack.jetbrains.com/issue/WEB-31858 is fixed in 2018.2.... Does the issue persist after upgrading?
Great, I've updated the IDE and now it's working, thank you!
Fine, thank you for patience and cooperation:)
Hi,
I still have the problem with the latest version of IntelliJ IDEA. The only workaround I found is to launch Xcode before launching IDEA.
For me works path /snap/node/current/lib/node_modules/npm
For OpenSUSE works path /usr/lib64/node_modules/npm14 or /usr/lib64/node_modules/npm[your node major version number]
Or so as not to add a path every time:
sudo mkdir /usr/lib/node_modules/
sudo ln -s /usr/lib64/node_modules/npm14/ /usr/lib/node_modules/
mv /usr/lib/node_modules/npm14/ /usr/lib/node_modules/npm/
or
sudo ln -s /usr/lib64/node_modules/npm[your node major version number]/ /usr/lib/node_modules/
mv /usr/lib/node_modules/npm[your node major version number]/ /usr/lib/node_modules/npm/
(For OpenSUSE )