After installing gulp.js via npm, I receive a no command 'gulp' found
error when running the gulp
command from the same directory it was installed into.
When looking under the node_modules/.bin/
directory, I can see the gulp
executable there.
Is there something wrong with my npm installation?
I solved the issue removing gulp and installing gulp-cli again:
I had to place
sudo
beforenpm install gulp-cli -g
.Running as administrator did not work for me. Maybe it might for some of you.
I solved the issue without reinstalling node using the commands below:
That's perfectly normal. If you want
gulp-cli
available on the command line, you need to install it globally.See the install instruction.
Also,
node_modules/.bin/
isn't in your$PATH
. But it is automatically added by npm when running npm scripts (see this blog post for reference).So you could add
scripts
to yourpackage.json
file:You could then run
npm run gulp
ornpm run minify
to launch gulp tasks.Installing on a Mac - Sierra - After numerous failed attempts to install and run gulp globally via the command line using several different instructions I found I added this to my path and it worked:
I got that path from the text output when installing gulp.
I actually have the same issue.
This link is probably my best guess:
nodejs vs node on ubuntu 12.04
I did that to resolve my problem: