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.
Please sign in to leave a comment.
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)
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.)
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.
Restarting Toolbox or running Webstorm outside it doesn't fix the problem.
see https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008275400/comments/360001894100