I had a similar error, and this happened because I did not indicate my path to where I installed node.js. In webstorm go to the menu "File" → "Settings" → "Language & Frameworks" → node.js and NPM and in the text field of the Node interpreter, specify the path to the path where node.js. was installed. For me it was in C: \ Program Files (x86) \ nodejs.
source
share