[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.

Comment actions Permalink


I still have the problem with the latest version of IntelliJ IDEA. The only workaround I found is to launch Xcode before launching IDEA.

Comment actions Permalink

Great, I've updated the IDE and now it's working, thank you!

Comment actions Permalink

>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?

Comment actions Permalink

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, where prefix can be obtained via npm config get prefix


Comment actions Permalink

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:

Comment actions Permalink

what is the result of running npm config get prefix?

Comment actions Permalink

 Hi, I've already put at previous image :-) I got /usr/local


Comment actions Permalink

weird... please run npm --help and provide the full output

Comment actions Permalink

Hi, here it goes, please also see after the output.

fernando@rohan:~$ npm --help

Usage: npm <command>

where <command> is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install,
    install-test, issues, it, la, link, list, ll, ln, login,
    logout, ls, outdated, owner, pack, ping, prefix, prune,
    publish, r, rb, rebuild, remove, repo, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, upgrade, v, verison,
    version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@3.5.2 /usr/share/npm

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:

Comment actions Permalink

Fine, thank you for patience and cooperation:)

Comment actions Permalink

For me works path /snap/node/current/lib/node_modules/npm


Please sign in to leave a comment.