I'm using WebStorm for a fairly straightforward project using Node, NPM, and Gulp. One of my Gulp tasks ends up doing gulp lint
in a subprocess, and unless I have gulp
on my PATH
, I get
[14:20:37] Starting 'lint-parallel'... events.js:160 throw er; // Unhandled 'error' event ^ Error: spawn gulp ENOENT at exports._errnoException (util.js:1018:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)
So my question: what's the correct way to set up WebStorm so node_modules/.bin
is on my PATH
? I ended up setting PATH
in Gulp Settings → Environment to node_modules/.bin:<rest of path>
, but it felt very manual for pretty basic behavior. Or should I have PATH=node_modules/.bin:$PATH
in my shell profile and let WebStorm pick it up that way?