1

我试图在我的 Windows 7 上安装 socket.io。

我已经尝试了几乎所有的安装方式。我想使用 npm 进行全局安装。我不想使用本地包含的方法。我希望全局安装该软件包。

我在这里附上了 npm-debug.log 文件内容的踪迹。如果您需要完整的文件,请告诉我我可以为您提供。

帮助将不胜感激。

203 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
204 verbose lock https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz C:\Users\ehussain\AppData\Roaming\npm-cache\83592abd-ient-socket-io-client-0-9-16-tgz.lock
205 verbose read json C:\Users\ehussain\AppData\Roaming\npm-cache\redis\0.7.3\package\package.json
206 verbose addRemoteTarball [ 'https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz',
206 verbose addRemoteTarball   '4da7515c5e773041d1b423970415bcc430f35fc6' ]
207 silly lockFile 10399cfa-redis-0-7-3 redis@0.7.3
208 silly lockFile 10399cfa-redis-0-7-3 redis@0.7.3
209 info retry fetch attempt 1 at 17:58:56
210 verbose fetch to= C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
211 http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
212 http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
213 http 304 https://registry.npmjs.org/base64id/0.1.0
214 silly registry.get cb [ 304,
214 silly registry.get   { server: 'CouchDB/1.3.0 (Erlang OTP/R15B03)',
214 silly registry.get     etag: '"CTLQBM2XI54YVEFGWA4X7AK4Y"',
214 silly registry.get     date: 'Mon, 05 Aug 2013 12:29:04 GMT',
214 silly registry.get     'content-length': '0' } ]
215 verbose etag base64id/0.1.0 from cache
216 verbose read json C:\Users\ehussain\AppData\Roaming\npm-cache\base64id\0.1.0\package\package.json
217 silly lockFile b2185bf4-base64id-0-1-0 base64id@0.1.0
218 silly lockFile b2185bf4-base64id-0-1-0 base64id@0.1.0
219 silly shasum updated bytes 65536
220 silly shasum updated bytes 65536
221 silly shasum updated bytes 65536
222 silly shasum updated bytes 65536
223 silly shasum updated bytes 65536
224 silly shasum updated bytes 65536
225 silly shasum updated bytes 65536
226 silly shasum updated bytes 65536
227 silly shasum updated bytes 65536
228 silly shasum updated bytes 65536
229 silly shasum updated bytes 65536
230 silly shasum updated bytes 65536
231 silly shasum updated bytes 65536
232 silly shasum updated bytes 65536
233 silly shasum updated bytes 65536
234 silly shasum updated bytes 30201
235 info shasum ab2e3004bdbd9f9e1023846ebad926c5e2f162cd
235 info shasum C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
236 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
237 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
238 silly lockFile c81dc0af-socket-io-client-0-9-16 socket.io-client@0.9.16
239 silly lockFile c81dc0af-socket-io-client-0-9-16 socket.io-client@0.9.16
240 verbose about to build C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io
241 info C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io unbuild
242 verbose from cache C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io\package.json
243 info preuninstall socket.io@0.9.16
244 info uninstall socket.io@0.9.16
245 verbose true,C:\Users\ehussain\AppData\Roaming\npm\node_modules,C:\Users\ehussain\AppData\Roaming\npm\node_modules unbuild socket.io@0.9.16
246 info postuninstall socket.io@0.9.16
247 error Error: shasum check failed for C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
247 error Expected: 4da7515c5e773041d1b423970415bcc430f35fc6
247 error Actual:   ab2e3004bdbd9f9e1023846ebad926c5e2f162cd
247 error     at D:\Work\Nodejs\node\node_modules\npm\lib\utils\sha.js:29:20
247 error     at ReadStream.<anonymous> (D:\Work\Nodejs\node\node_modules\npm\lib\utils\sha.js:49:5)
247 error     at ReadStream.EventEmitter.emit (events.js:117:20)
247 error     at _stream_readable.js:870:14
247 error     at process._tickCallback (node.js:415:13)
248 error If you need help, you may report this log at:
248 error     <http://github.com/isaacs/npm/issues>
248 error or email it to:
248 error     <npm-@googlegroups.com>
249 error System Windows_NT 6.1.7601
250 error command "D:\\Work\\Nodejs\\node\\\\node.exe" "D:\\Work\\Nodejs\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" "-g"
251 error cwd D:\Work\Nodejs\node
252 error node -v v0.10.0
253 error npm -v 1.2.14
254 verbose exit [ 1, true ]
4

1 回答 1

2

用 npm 1.3 试了一下,效果很好。

尝试清除 npm 缓存

npm cache clean

希望有帮助。

当一切都失败时,清除你的缓存

于 2013-08-06T05:35:26.323 回答