43

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

8
  • can you show how you are calling gulp on the command line? Commented Oct 1, 2014 at 7:38
  • I just ran "gulp -v" but it does not show any info not even any error messages. @BeNdErR Commented Oct 1, 2014 at 7:40
  • What's the output of the which gulp command? Commented Oct 2, 2014 at 7:48
  • 1
    @RaphDG, "gulp" or "gulp -v" does not return anything. Commented Oct 2, 2014 at 14:43
  • What about "which gulp" ? Commented Oct 2, 2014 at 14:50

6 Answers 6

40

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Worked for me after following RaphDG, daniels, then jmw327 response's in that order! TY.
gulp needs node (#!/usr/bin/env node) so how can removing it solve the problem? Can you explain this a bit more? If I follow this advice I quite rightly get /usr/bin/env: node: No such file or directory
Never mind. I found the answer: stackoverflow.com/questions/21168141/…
34

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

5 Comments

problem still persists :( "gulp" or "gulp -v" do nothing.
Have you tried this sudo ln -s /usr/bin/nodejs /usr/bin/node ?
It says, ln: failed to create symbolic link ‘/usr/bin/node’: File exists
Don't forget to run npm install gulp -g again afterwards
If you have, say, $HOME/bin earlier in your path than the location of node, you can ln -s $(which nodejs) $HOME/bin/node without the sudo. Note that gulp-cli expects gulp to be installed locally, not globally (that is, omit -g).
21

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

sudo npm install --global gulp-cli

2 Comments

You must not use "sudo" while installing any package, as it creates problems,....try it without sudo!
Worked for me with sudo. Without sudo it says npm ERR! Please try running this command again as root/Administrator.
17

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.

1 Comment

Works for me too.
2

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

`

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.