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
In my case adding sudo before npm install solved gulp command not found problem
sudo npm install
I realize that this is an old thread, but for Future-Me, and posterity, I figured I should add my two-cents around the "running npm as sudo" discussion. Disclaimer: I do not use Windows. These steps have only been proven on non-windows machines, both virtual and physical.
You can avoid the need to use sudo by changing the permission to npm's default directory.
sudo
npm config get prefix
/usr/local
/usr
or /Users/YOURUSERNAME/node_modules
or /Something/Else/FishyLooking
npm config set prefix /usr/local
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
Now you should be able to run npm <whatever>
without sudo
. Note: You may need to restart your terminal in order for these changes to take effect.
If you are on Mac run use root privilege
sudo npm install gulp-cli --global
To check if it's installed run
gulp -v
CLI version: 2.2.0 (The output)
Local version: Unknown
You need to do this npm install --global gulp
. It works for me and i also had this problem. It because you didn't install globally this package.
Not sure why the question was down-voted, but I had the same issue and following the blog post recommended solve the issue. One thing I should add is that in my case, once I ran:
npm config set prefix /usr/local
I confirmed the npm root -g
was pointing to /usr/local/lib/node_modules/npm
, but in order to install gulp
in /usr/local/lib/node_modules
, I had to use sudo
:
sudo npm install gulp -g