我正在使用yeoman構建我的角度應用程序。npm-yeoman中的代理設置
我已經設置代理和註冊表如下:
npm config set proxy http://proxy.tcs.com:8080
npm config set https-proxy http://proxy.tcs.com:8080
npm config set registry http://registry.npmjs.org/
即使設定爲上述委託書,而安裝
npm install grunt-ngmin,
我碰到下面的錯誤,
npm WARN package.json [email protected] No README.md file found!
npm http GET http://registry.npmjs.org/grunt-ngmin
npm http 407 http://registry.npmjs.org/grunt-ngmin
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! <HEAD><TITLE>Proxy Authorization Required</TITLE></HEAD>
npm ERR! <BODY BGCOLOR="white" FGCOLOR="black"><H1>Proxy Authorization Required</H1><HR>
npm ERR! <FONT FACE="Helvetica,Arial"><B>
npm ERR! Description: Authorization is required for access to this proxy</B></FONT>
npm ERR! <HR>
npm ERR! <!-- default "Proxy Authorization Required" response (407) -->
npm ERR! </BODY>
npm ERR!
npm ERR! at Object.parse (native)
npm ERR! at RegClient.<anonymous> (C:\Users\Documents\tools\nodejs\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:235:23)
npm ERR! at Request.self.callback (C:\Users\Documents\tools\nodejs\nodejs\node_modules\npm\node_modules\request\main.js:120:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (C:\Users\Documents\tools\nodejs\nodejs\node_modules\npm\node_modules\request\main.js:648:16)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (C:\Users\Documents\tools\nodejs\nodejs\node_modules\npm\node_modules\request\main.js:610:14)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:910:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\\Documents\\tools\\nodejs\\nodejs\\\\node.exe" "C:\\Users\\\Documents\\tools\\nodejs\\nodejs\\node_modules\\npm\\bin\\npm-cli.j
"grunt-ngmin"
npm ERR! cwd C:\nodejs\Teamshare\Teamshareangular
npm ERR! node -v v0.10.7
npm ERR! npm -v 1.2.14
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\nodejs\Teamshare\Teamshareangular\npm-debug.log
npm ERR! not ok code 0
後什麼是要做到這一點?
我應該在npm中做一些其他設置嗎?
請指教。
可能是您的代理不允許匿名連接,並且需要授權 –
如何克服該問題? – user67867