Windows で nodejs(0.8.12) を使用しており、npm パッケージ (jquery など) をインストールしようとしましたが、次のエラーが発生しました。エラーログにhttp 404エラーとありましたが、Webブラウザで接続できました。私のネットワーク環境について詳しく説明すると、私の会社はプロキシを使用していますが、前述のようにブラウザで npm レジストリに接続できます。
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'jquery' ]
2 info using npm@1.1.63
3 info using node@v0.8.12
4 verbose node symlink C:\Program Files\nodejs\node.exe
5 verbose read json D:\development\web\myjam\package.json
6 verbose read json D:\development\web\myjam\package.json
7 verbose cache add [ 'jquery', null ]
8 silly cache add name=undefined spec="jquery" args=["jquery",null]
9 verbose parsed url { pathname: 'jquery', path: 'jquery', href: 'jquery' }
10 silly lockFile 6f2ab963-jquery jquery
11 verbose lock jquery C:\Users\305021818\AppData\Roaming\npm-cache\6f2ab963-jquery.lock
12 silly lockFile 6f2ab963-jquery jquery
13 verbose addNamed [ 'jquery', '' ]
14 verbose addNamed [ null, '' ]
15 silly lockFile 039e748d-jquery jquery@
16 verbose lock jquery@ C:\Users\305021818\AppData\Roaming\npm-cache\039e748d-jquery.lock
17 silly addNameRange { name: 'jquery', range: '', hasData: false }
18 verbose url raw jquery
19 verbose url resolving [ 'http://registry.npmjs.org/', './jquery' ]
20 verbose url resolved http://registry.npmjs.org/jquery
21 info trying registry request attempt 1 at 15:13:13
22 http GET http://registry.npmjs.org/jquery
23 http 404 http://registry.npmjs.org/jquery
24 verbose bad json
Apache Tomcat/5.5.28 - Error report<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
HTTP Status 404 - /jquery
type Status report
message /jquery
description The requested resource (/jquery) is not available.
Apache Tomcat/5.5.28
25 error registry error parsing json
26 silly registry.get cb [ 404,
26 silly registry.get { date: 'Wed, 24 Oct 2012 06:13:16 GMT',
26 silly registry.get server: 'Apache/2.2.8 (Unix) mod_jk/1.2.15',
26 silly registry.get 'content-length': '973',
26 silly registry.get 'keep-alive': 'timeout=5, max=100',
26 silly registry.get connection: 'Keep-Alive',
26 silly registry.get 'content-type': 'text/html;charset=utf-8' } ]
27 silly lockFile 039e748d-jquery jquery@
28 error SyntaxError: Unexpected token <
28 error Apache Tomcat/5.5.28 - Error report<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
HTTP Status 404 - /jquery
type Status report
message /jquery
description The requested resource (/jquery) is not available.
Apache Tomcat/5.5.28
28 error at Object.parse (native)
28 error at RegClient. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:226:23)
28 error at Request.init.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:120:22)
28 error at Request.EventEmitter.emit (events.js:96:17)
28 error at Request. (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:648:16)
28 error at Request.EventEmitter.emit (events.js:123:20)
28 error at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:610:14)
28 error at IncomingMessage.EventEmitter.emit (events.js:123:20)
28 error at IncomingMessage._emitEnd (http.js:366:10)
28 error at HTTPParser.parserOnMessageComplete as onMessageComplete
29 error If you need help, you may report this log at:
29 error http://github.com/isaacs/npm/issues
29 error or email it to:
29 error npm-@googlegroups.com
30 error System Windows_NT 6.1.7601
31 error command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "jquery"
32 error cwd D:\development\web\myjam
33 error node -v v0.8.12
34 error npm -v 1.1.63
35 error type unexpected_token
36 verbose exit [ 1, true ]