返回信息流之前npm install ws -g成功过 可是node echo.js时仍提示cannot find module 'ws'…
我就寻思着吧是不是没安好。。。估计之前脑子发热google了一下把path给改了(改成啥也不记得了。。。)
然后后面也没管,今天做实验的时候再次npm install ws -g时报了错,npm-debug.log如下
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\nodejs\\\\node.exe',
1 verbose cli 'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'ws' ]
2 info using npm@1.4.3
3 info using node@v0.10.26
4 verbose node symlink D:\nodejs\\node.exe
5 verbose cache add [ 'ws', null ]
6 verbose cache add name=undefined spec="ws" args=["ws",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: 'ws',
7 verbose parsed url path: 'ws',
7 verbose parsed url href: 'ws' }
8 silly lockFile 1457b75d-ws ws
9 error Error: Attempt to unlock ws, which hasn't been locked
9 error at unlock (D:\nodejs\node_modules\npm\lib\cache.js:1304:11)
9 error at cb (D:\nodejs\node_modules\npm\lib\cache.js:866:5)
9 error at D:\nodejs\node_modules\npm\lib\cache.js:883:20
9 error at D:\nodejs\node_modules\npm\lib\cache.js:1282:20
9 error at D:\nodejs\node_modules\npm\node_modules\mkdirp\index.js:37:53
9 error at Object.oncomplete (fs.js:107:15)
10 error If you need help, you may report this *entire* log,
10 error including the npm and node versions, at:
10 error <http://github.com/npm/npm/issues>
11 error System Windows_NT 6.2.9200
12 error command "D:\\nodejs\\\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ws"
13 error cwd D:\nodejs
14 error node -v v0.10.26
15 error npm -v 1.4.3
16 verbose exit [ 1, true ]
重新把nodejs用卸安装文件卸了再安也还是一样…
嗯 环境是 windows 8 64bit,nodejs是从官网下的…
特来万能的论坛求救T T
这是一条镜像帖。来源:北邮人论坛 / www-technology / #24598同步于 2014/4/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
小白求教nodejs npm的问题…
FreeDani
2014/4/10镜像同步3 回复
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
谢谢~!虽然我也不知道为什么 后面把nodejs卸了再装上 然后用管理员运行cmd以后就可以了~
【 在 cookier 的大作中提到: 】
: 这是WS在windows上BUILD的问题,跟你没关系。NPM在windows上面build ws要出错,去linux或者mac osx吧