I installed gulp(globally) and it looks like it worked because it ran this code:
├── tildify@0.2.0
├── interpret@0.3.5
├── pretty-hrtime@0.2.1
├── deprecated@0.0.1
├── archy@0.0.2
├── minimist@0.2.0
├── semver@2.3.2
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── chalk@0.5.1 (escape-string-regexp@1.0.1, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── gulp-util@2.2.20 (lodash._reinterpolate@2.4.1, dateformat@1.0.8-1.2.3, vinyl@0.2.3, through2@0.5.1, multipipe@0.1.1, lodash.template@2.4.1)
├── liftoff@0.12.0 (extend@1.2.1, minimist@0.1.0, resolve@0.7.4, findup-sync@0.1.3)
└── vinyl-fs@0.3.5 (graceful-fs@3.0.2, lodash@2.4.1, mkdirp@0.5.0, strip-bom@0.3.1, vinyl@0.2.3, through2@0.5.1, glob-watcher@0.0.6, glob-stream@3.1.14)
But when I type gulp
it says -bash: gulp: command not found
Any idea what's going on?
I got this working on Win10 using a combination of the answers from above and elsewhere. Posting here for others and future me.
I followed the instructions from here: https://gulpjs.com/docs/en/getting-started/quick-start but on the last step after typing gulp --version I got the message -bash: gulp: command not found
To fix this:
Also, found the below for reasons why not to install gulp globally and how to remove it (not sure if this is advisable though):
what does gulp-"cli" stands for?
How to uninstall Gulp CLI from NPM globally?
I had this problem with getting "command not found" after install but I was installed into /usr/local as described in the solution above.
My problem seemed to be caused by me running the install with sudo. I did the following.
If you're using
tcsh
(which is my default shell on Mac OS X), you probably just need to typerehash
into the shell just after the install completes:followed immediately by:
Otherwise, if this is your very first time installing
gulp
, your shell may not recognize that there's a new executable installed -- so you either need to start a new shell, or typerehash
in the current shell.(This is basically a one-time thing for each command you install globally.)
Turns out that npm was installed in the wrong directory so I had to change the “npm config prefix” by running this code:
Then I reinstalled gulp globally (with the -g param) and it worked properly.
This article is where I found the solution: http://webbb.be/blog/command-not-found-node-npm
If you are on Mac run use root privilege
sudo npm install gulp-cli --global
To check if it's installed run
CLI version: 2.2.0 (The output)
In my case adding sudo before npm install solved gulp command not found problem
sudo npm install