简体   繁体   English

私人NPM Sinopia注册表安装错误

[英]Private NPM Sinopia registry install error

I start working with NPM and I was begging with Sinopia as a solution for private npm registry . 我开始与NPM合作, 并向Sinopia寻求 NPM 私人注册表解决方案 So my first command was : npm install -g sinopia and I fail with many error so I consult this for requirement modules . 所以我的第一个命令是: npm install -g sinopia ,我失败了,并出现很多错误,因此我参考了需求模块 So after installing all of it, the number of error was decreasing, and this what I got: 因此,在安装所有组件之后,错误数量正在减少,这就是我得到的:

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

Did anybody can help me please? 有人可以帮我吗? and tell me where is the problem from? 告诉我问题出在哪里?

Thank you so much.. 非常感谢..

The issue is here: 问题在这里:

gyp http 407 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

407 response from a HTTP request means that proxy authentication is required. 来自HTTP请求的407响应意味着需要代理身份验证。

Here is how to add username/password credentials: 以下是添加用户名/密码凭证的方法:

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

Use quotes around the username if it includes the at-symbol(@) to escape it. 如果用户名包含at-symbol(@),请在用户名周围使用引号将其转义。

References 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM