猿问

npm安装依赖报错

我在服务器上面执行npminstall--production,结果出现了一堆的不是我依赖的模块。整个过程很长。下面的只是一部分
npmhttp304https://registry.npmjs.org/ansi-regex
npmhttpGEThttps://registry.npmjs.org/meow
npmhttpGEThttps://registry.npmjs.org/get-stdin
npmhttp304https://registry.npmjs.org/find-index
npmhttp304https://registry.npmjs.org/get-stdin
npmhttp304https://registry.npmjs.org/meow
npmhttpGEThttps://registry.npmjs.org/lodash._isnative
npmhttpGEThttps://registry.npmjs.org/lodash.isobject
npmhttpGEThttps://registry.npmjs.org/lodash._shimkeys
npmhttpGEThttps://registry.npmjs.org/lodash._escapehtmlchar
npmhttpGEThttps://registry.npmjs.org/lodash._reunescapedhtml
npmhttpGEThttps://registry.npmjs.org/wrappy
npmhttpGEThttps://registry.npmjs.org/lodash._objecttypes
npmhttpGEThttps://registry.npmjs.org/inherits
npmhttpGEThttps://registry.npmjs.org/brace-expansion
npmhttpGEThttps://registry.npmjs.org/core-util-is
npmhttpGEThttps://registry.npmjs.org/isarray/0.0.1
npmhttpGEThttps://registry.npmjs.org/concat-map/0.0.1
npmhttpGEThttps://registry.npmjs.org/balanced-match
npmhttpGEThttps://registry.npmjs.org/inherits
npmhttpGEThttps://registry.npmjs.org/inflight
然后经过很长时间之后,就报错了:
(ratherthananarrayof`Cookie`s)tothecallback.Simplymapsthecookiearrayvia`.toString()`.\u000a\u000a#CookieStoreAPI\u000a\u000aThestoragemodelfor
npmERR!atObject.parse(native)
npmERR!atRegClient.(/usr/lib/node_modules/npm-registry-client/lib/request.js:238:23)
npmERR!atRequest.self.callback(/usr/lib/node_modules/request/index.js:148:22)
npmERR!atRequest.emit(events.js:98:17)
npmERR!atRequest.(/usr/lib/node_modules/request/index.js:891:14)
npmERR!atRequest.emit(events.js:117:20)
npmERR!atIncomingMessage.(/usr/lib/node_modules/request/index.js:842:12)
npmERR!atIncomingMessage.emit(events.js:117:20)
npmERR!at_stream_readable.js:938:16
npmERR!atprocess._tickCallback(node.js:419:13)
npmERR!Ifyouneedhelp,youmayreportthislogat:
npmERR!
npmERR!oremailitto:
npmERR!
npmERR!SystemLinux2.6.32-279.el6.x86_64
npmERR!command"node""/usr/bin/npm""install""--production"
npmERR!cwd/home/lottery/fabu/web/svn
npmERR!node-vv0.10.30
npmERR!npm-v1.3.6
npmERR!typeunexpected_eos
npmERR!
npmERR!Additionalloggingdetailscanbefoundin:
npmERR!/home/lottery/fabu/web/svn/npm-debug.log
npmERR!notokcode0
尝试了使用npmcacheclear清理缓存也不行,最后我们使用cnpm做替换,才解决问题。
我想问一下,这个问题是什么原因导致的,该怎么解决?
萧十郎
浏览 631回答 2
2回答

守候你守候我

我和你一样,用npm不行,用cnpm安装就行我的linux服务器是国外的,你找到原因了吗可以告诉我吗
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答