[英]npm command key to install package globally
我正在尝试在OS X上全局安装gulp,但我注意到我想了解的一件奇怪的事情。 首先,我尝试了以下命令:
npm install -g glup
导致以下错误:
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:
但是当我这样尝试时:
npm install --global gulp
命令成功。
因此,我想了解-g
和--global
之间的区别。 我看到了其他答案,但所有答案都是相同的。 如果两个键可以互换,那么为什么会有不同的结果?
'glup'不在npm注册表中。
你似乎已经输入glup
代替gulp
,并glup不存在的NPM。 这只是一个错字。 -g
和--global
之间应该没有区别。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.