我正在尝试按照以下方式安装凉亭 -
$ npm install -g bower or $npm install bower
npm ERR! fetch failed http://registry.npmjs.org/bower/-/bower-1.7.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/bower/-/bower-1.7.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/bower/-/bower-1.7.1.tgz
npm ERR! Linux 4.2.0-16-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! fetch failed with status code 403
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/ravi/watson/novus/nvd3/npm-debug.log
我已经有npm代理设置,如下例所示:
npm config list ; cli configs user-agent = "npm/2.11.3 node/v0.12.7 linux ppc64" ; userconfig /root/.npmrc http-proxy = "https://username:password@:8080/" https-proxy = "https://username:password@:8080/" proxy = "https://username:password@:8080/" registry = "http://registry.npmjs.org/" strict-ssl = false ; node bin location = /usr/local/bin/node ; cwd = /root/ravi/watson/novus/nvd3 ; HOME = /root ; 'npm config ls -l' to show all defaults.
答案 0 :(得分:2)
我尝试的虚拟对象是无代理的。所以我从npm配置设置中删除了所有代理。然后npm安装工作正常。该代理适用于超出代理的人。