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

Hi all,
I'm trying to make npm (https://npmjs.org/) 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: https://gist.github.com/isaacs/579814 (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?

4 comments
Comment actions Permalink

Hello!

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/PhpStorm.app/) solves the problem?

0
Comment actions Permalink

That seems to do it! Thanks!

0
Comment actions Permalink

I have the same problem now wit 2021.2

opening PhpStorm from Terminal (open  -a /Applications/PhpStorm.app/) 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?

 

Thanks

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

0

Please sign in to leave a comment.