PhpStorm Terminal doesn't recognize certain commands (nodejs, npm etc) ?

Hi all,
I'm trying to make npm ( and certain aspects of it work in the Terminal but I'm getting a command not found issue.
npm command is perfectly accessible via the MacOS terminal, and so are two other packages I've installed: jamjs and bower.

Out of the three commands: npm, jam and bower, only bower seems to be accessible via the PhpStorm terminal.

For reference, this is how I installed npm: (first snippet) and bower and jam were installed with:

npm install -g bower
npm install -g jamjs

both from the MacOS terminal. PhpStorm finds the bower command but not jam or npm.
Anyone can understand what I'm missing?

Comment actions Permalink


seems npm is not found in your PATH (or wrong PATH is passed to IDE). On  MacOSX applications don't use terminal environment unless started from  terminal. Please can you check if running PhpStorm from terminal (open  -a /Applications/ solves the problem?

Comment actions Permalink

That seems to do it! Thanks!

Comment actions Permalink

I have the same problem now wit 2021.2

opening PhpStorm from Terminal (open  -a /Applications/ makes the shell work, but open PhpStorm with the Icon in dock let the terminal forget everything.

How can this be fixed so I can use the terminal by normal starting PhpStorm?



Comment actions Permalink

Nevermind - I moved over to a new MacBook wehre nothing worked as it should.

I copied the ApplicationData for PhpStorm from the old computer to the new one. I deleted the folder and reinstalled PhpStorm - now it is working again.


Please sign in to leave a comment.