私人NPM Sinopiaregistry安装错误

我开始与NPM合作,并且与Sinopia一起求助于 私人npmregistry 。 所以我的第一个命令是: npm install -g sinopia ,我失败了很多错误,所以我请求了这个需求模块 。 所以安装完所有的后,错误的数量在减less,这就是我所得到的:

 C:\Users\tuto>npm install sinopia npm http GET https://registry.npmjs.org/sinopia npm http 304 https://registry.npmjs.org/sinopia npm http GET https://registry.npmjs.org/fs-ext npm http 304 https://registry.npmjs.org/fs-ext > fs-ext@0.3.2 install C:\Users\tuto\node_modules\sinopia\node_modules \fs-ext > node-gyp configure build C:\Users\tuto\node_modules\sinopia\node_modules\fs-ext>node "C:\Progra m Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi n\node-gyp.js" configure build gyp http GET http://nodejs.org/dist/v0.10.19/node-v0.10.19.tar.gz gyp http 407 http://nodejs.org/dist/v0.10.19/node-v0.10.19.tar.gz gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: 407 status code downloading tarball gyp ERR! stack at Request.<anonymous> (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\install.js:222:14) gyp ERR! stack at Request.EventEmitter.emit (events.js:117:20) gyp ERR! stack at Request.onResponse (C:\Program Files\nodejs\node_modules\n pm\node_modules\request\request.js:812:10) gyp ERR! stack at ClientRequest.g (events.js:175:14) gyp ERR! stack at ClientRequest.EventEmitter.emit (events.js:95:17) gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1689:21) gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:120:23) gyp ERR! stack at Socket.socketOnData (http.js:1584:20) gyp ERR! stack at TCP.onread (net.js:525:27) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu les\\node-gyp\\bin\\node-gyp.js" "configure" "build" gyp ERR! cwd C:\Users\tuto\node_modules\sinopia\node_modules\fs-ext gyp ERR! node -v v0.10.19 gyp ERR! node-gyp -v v0.10.10 gyp ERR! not ok npm ERR! weird error 1 npm ERR! not ok code 0 

有人可以帮我吗? 并告诉我问题从哪里来?

非常感谢..

问题在这里:

gyp http 407 http://nodejs.org/dist/v0.10.19/node-v0.10.19.tar.gz

来自HTTP请求的407响应意味着需要代理authentication。

以下是如何添加用户名/密码凭据:

 npm config set proxy http://username:password@proxy.company.com:1234 npm config set https-proxy http://username:password@proxy.company.com:4567 

如果包含at符号(@),则在用户名周围使用引号来转义它。

参考

  • npmrc手册页
  • 快乐节点黑客的10个习惯
  • 制作节点virtualenv
  • 在当前用户下安装Node.js for ACS