IDE Settings: PhpStorm can't find Node.js in %PATH%

Under Languages & Frames > Node.js and NPM > Node interpreter, it says "No executable found in %PATH%". The Node executable path (C:\Program Files\nodejs\) IS in my (system) %PATH%. I can verify this by opening cmd.exe and entering "where node". Result: C:\Program Files\nodejs\node.exe. I tried adding the path to my user %PATH%, but that didn't work. I don't want to "hard code" the path to the executable because I plan to share my IDE settings on other machines.

0
5 comments

please try re-starting PHPstorm - does the issue persist? If yes, please provide a screenshot of Languages & Frames > Node.js and NPM  and idea.log (Help > Show log in Explorer)

0

Yes, the issue persisted after restarting.

Screenshot:

 

Log file: https://drive.google.com/file/d/116Z5cLXl_eH5pd-UiaJm8ZJglfPUCr_h/view?usp=sharing (It's private, you'll have to request access.)

0

Solved the problem. I was running PhpStorm through Toolbox, and apparently Toolbox stores a copy of the system environment variables which it passes to any program you launch. The env variables, particularly Path, were out of sync with the actual environment. I needed to restart Toolbox to fix the issue.  My naive assumption was that simply restarting PhpStorm would give it the latest copy of Path.

1

Restarting Toolbox or running Webstorm outside it doesn't fix the problem.

0

Please sign in to leave a comment.