当尝试npm install
这个确切的package.json
时,npm挂起并变得完全没有响应。
{
"name": "My Project",
"description": "My Project",
"version": "1.0.0",
"private": true,
"main": "server.js",
"dependencies": {
"body-parser": "^1.15.2",
"compression": "^1.6.2",
"cors": "^2.8.0",
"loopback": "^2.31.0",
"loopback-boot": "^2.21.0",
"loopback-component-explorer": "^2.5.0",
"loopback-connector-mysql": "^2.3.0",
"loopback-connector-redis": "^0.0.3",
"loopback-datasource-juggler": "^2.50.0",
"loopback-ds-timestamp-mixin": "^3.4.0",
"mosca": "^2.1.0",
"mqtt": "^1.14.1",
"q": "^1.4.1",
"redis": "^2.6.2",
"serve-favicon": "^2.3.0",
"socket.io": "^1.4.8",
"socketio-auth": "0.0.5"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-docular": "^0.2.4",
"grunt-loopback-sdk-angular": "^1.2.0",
"jshint": "^2.9.3"
},
"scripts": {
"start": "node .",
"pretest": "jshint ."
}
}
我在不同的客户端上测试了这个,使用npm版本3.10.6和节点v6.5.0。我很确定它在几天前就有效了,但现在,它只是拒绝完成。我尝试npm cache clean
,尝试将maxsockets
降低到1,等待20-30分钟并尝试从packages.json
中移除包裹,但找到了罪魁祸首,这是一个命中和未命中。例如,单独使用“mosca”会使npm挂起,但即使从package.json
中删除,它仍然无法完成。
我看到的最后一条消息是:
[ .....] - extract:socketio-auth: sill doParallel extract 852
然后什么都没有。即使将日志记录级别设置为愚蠢,它也不会产生任何错误。它只是永远挂起。我真的不明白,我很确定它在某天前工作。有人能帮我吗?这个package.json
对你有用吗?