0

I am trying to install gulp on OS X globally but I have noticed a strange thing which I want to understand. First I tried the following command:

npm install -g glup

Which resulted in the following error:

npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "glup"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/glup
npm ERR! 404 
npm ERR! 404 'glup' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:

But when I tried it this way:

npm install --global gulp

the command has succeeded.

So, I want to understand what is the difference between -g and --global. I have seen other answers but all of them are the same. If both keys are interchangeable then why different results?

Konstantin Grushetsky
  • 1,012
  • 1
  • 15
  • 32
Mikul Gohil
  • 583
  • 1
  • 7
  • 14

1 Answers1

5

'glup' is not in the npm registry.

You seem to have typed glup instead of gulp, and glup doesn't exist on npm. It was just a typo. There should be no difference between -g and --global.

Wouter
  • 756
  • 3
  • 11