Dipendra Gurung
Dipendra Gurung

Reputation: 5870

gulp command does not work

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

Upvotes: 43

Views: 55466

Answers (6)

Konstantinos
Konstantinos

Reputation: 121

even after uninstalling and installing nodejs and npm kept getting "/usr/bin/env: ‘node’: No such file or directory"

so i checked the node version (not nodejs): node -v got "The program 'node' is currently not installed. You can install it by typing: sudo apt install nodejs-legacy"

so i did install it: sudo apt install nodejs-legacy

and gulp works fine.

Upvotes: 0

Abdulla Nilam
Abdulla Nilam

Reputation: 38584

You can Install gulp by using terminal(npm install -g gulp). But best way is use Synaptic Package Manager. This is old Software installer of Ubuntu. but now Ubuntu Introduce Ubuntu Software Center.

Cz of I recommended Synaptic is when you install some software it will download some of helpers too. Ex if you want download gulp(Node.js) in search type node.js. It will show some other apps too. Select all and click apply.

  1. To download Synaptic

    • sudo apt-get install synaptic
  2. To install Node.js too.

  3. To check node version

    • node --version
  4. To run gulp, Go to the directory and just type gulp.

It will load all your project


Update 2017-10-14

To install complete node, follow these

  1. Remove node(if exist) sudo apt-get remove nodejs Check this as well
  2. Remove npm(if exist) sudo apt-get remove npm
  3. Clean sudo apt-get autoremove
  4. sudo apt-get update
  5. sudo apt-get install nodejs
  6. sudo apt-get install npm

now check command gulp

`

Upvotes: 2

gdupont
gdupont

Reputation: 1678

On my side, same symptom. What was missing is th CLI part of gulp:

sudo npm install --global gulp-cli

Upvotes: 21

jmw327
jmw327

Reputation: 409

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.

Upvotes: 40

RaphDG
RaphDG

Reputation: 1371

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

Upvotes: 34

Etienne
Etienne

Reputation: 655

When you have these kind of problem, my advice is to reinstall the module :

npm un -g gulp && npm un gulp
npm i -g gulp
npm i --save-dev gulp

These commands uninstall all gulp modules in local and global.

After, it installs gulp in global to use it in the command line, and in your local modules, because gulp needs it as well.

Upvotes: 17

Related Questions