In WebStorm, while using nvm, after updating from node 14 to 16, I updated an existing run configuration from 14 to 16, then I got this error:
/path/to/node /path/to/npm-cli.js run build --scripts-prepend-node-path=auto
npm run build
sh: 1: npm: not found
All of the paths to node and the cli were correct. Copy-pasting the command from the output into a terminal launched the npm script correctly.
CodePudding user response:
Delete the run configuration, and recreate it (e.g. click the play (green triangle) icon in the package.json
gutter next to the script to run)