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?