Running gulp from cmd works but not in WebStorm

时间:2017-07-12 08:10:46

标签: javascript node.js gulp webstorm

I have a project which is using gulp to run everything. When I do gulp runfrom the command line everything works fine. However when I set up the project in WebStorm to run with gulp it does not work. Node seems not to be found: sh: 1: node: not found events.js:168 throw err;

1 个答案:

答案 0 :(得分:1)

I found a solution eventually. My node is installed at ~/.nvm/versions/node/v7.7.3/bin/node This is also configured in WebStorm, however somehow when running the the gulp task it looks at /usr/bin/node.

So to solve I made a symbolic link to my node install: sudo ln -s ~/.nvm/versions/node/v7.7.3/bin/node /usr/bin/node This solved my problem.