Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gulp command does not work

Tags:

gulp

ubuntu

I am using ubuntu 14.04 LTS, I have nodejs (not node) and npm installed. I had installed gulp using npm install gulp -g.

But my command gulp does not work, it runs silently returning nothing!

enter image description here

like image 849
Dipendra Gurung Avatar asked Oct 01 '14 07:10

Dipendra Gurung


People also ask

Why gulp is not installed globally?

the gulp-cli , because this is a command line utility, that can be called from anywhere on your computer. Its a globally accessible cli command. You console needs to be able to see it. You do not import this.

How do you fix gulp is not recognized as an internal or external command operable program or batch file?

To solve the error "'gulp' is not recognized as an internal or external command, operable program or batch file", install the gulp-cli package globally by running npm install -g gulp-cli , restart your terminal and make sure your PATH environment variable is set up correctly.

How do I know if gulp is installed?

First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.


2 Answers

I ran into the same problem today on Ubuntu 14.04 LTS. After debugging I noticed that I had accidentally installed nodejs and node using apt-get. After running

sudo apt-get remove node

the problem was fixed.

Hope this helps.

like image 156
jmw327 Avatar answered Oct 12 '22 02:10

jmw327


Try linking the nodejs executable to node in the same path.

Something like:

sudo ln -s /usr/bin/nodejs /usr/bin/node 

Depending on where your node executable is. You can find out with

which nodejs 
like image 36
RaphDG Avatar answered Oct 12 '22 03:10

RaphDG