Evanss
Evanss

Reputation: 23583

'Gulp' not found after installation?

Ive forked a repo and run npm install. I can see gulp is installed in the node_modules folder. However when I run gulp or gulp -v on the command line it says command not found.

If I open a new terminal in a different folder (which is outside of the repo eg my home folder) and run gulp -v I can see the version:

CLI version 3.9.0

So it seems gulp is installed both locally and globally but its still not working. I have gulp working find on another project that I previously set up.

This is a similar question but the solution posed does not work: no command 'gulp' found - after installation

Upvotes: 0

Views: 923

Answers (2)

Evanss
Evanss

Reputation: 23583

After completely deleting and re-cloning the repo its now working. Im not sure why but I did add this line:

PATH="$HOME/.npm/bin:$PATH"  

To my bash profile:

~/.bash_profile PATH="$HOME/.npm/bin:$PATH" 

And then on the command line ran:

npm config set prefix $HOME/.npm

This allows me to run npm install without sudo and so may or may not have fixed it.

Upvotes: 1

A Macdonald
A Macdonald

Reputation: 824

You need to install gulp globally, most probably using sudo

sudo npm install -g gulp

this will ensure the command is available to you as you want

Upvotes: 0

Related Questions