1

When trying to npm install this exact package.json, npm hangs and becomes totally unreponsive.

{
  "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 ."
  }
}

I tested this on different clients, both using npm version 3.10.6 and node v6.5.0. I'm pretty sure it worked some days ago, but now, it just refuses to complete. I tried npm cache clean, tried lowering maxsockets down to 1, waiting for 20-30 minutes and tried to remove packages from packages.json, but finding the culprit it's a hit and miss. For example, "mosca" alone makes npm hang, but even when removed from package.json, it still won't finish.

The last message I see it's:

[             .....] - extract:socketio-auth: sill doParallel extract 852

and then just nothing. It doesn't give any error, even when setting logging level to silly. It just hangs forever. I really don't understand and I'm pretty sure it was working some day ago. Can someone help me? Does this package.json work for you?

I already checked this,this and this, but I think it's not related to them.

Community
  • 1
  • 1

1 Answers1

0

I't a known npm bug, still open... :-(
I'd rollback npm to 6.4 (which is #13782 bug free), till it's fixed...

MarcoS
  • 17,323
  • 24
  • 96
  • 174
  • Thanks! You nailed it! I'm exactly on Arch Linux and it was working before because I indeed updated to v6.5.0 just a couple of days ago. That's unfortunate however. Too bad I didn't search on npm issue tracker, nice catch! – gabrielelucci Sep 02 '16 at 13:03