NPM install hangs when installing packages

Viewed 20076

I currently using a project. It works fine but the problem when I remove the project files(except node_modules) to another folder or GitHub, reinstalling packages via npm is not successful. It always hangs at

extract:rxjs: sill extract big.js@3.1.3

I tried npm cache verify no luck.

Here is packages.json

{
  "name": "esas",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/material": "^2.0.0-beta.10",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.3",
    "angular2-loaders-css": "^1.0.9",
    "angular2-perfect-scrollbar": "^2.0.6",
    "bootstrap": "^4.0.0-beta",
    "core-js": "^2.4.1",
    "material-design-icons": "^3.0.1",
    "node-sass": "^4.5.3",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.3.2",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}

I am using:

  • Windows 10
  • Node version: 8.50

Any ideas what is wrong? Kind Regards

3 Answers

Solved problem by

  1. Remove package-lock.json
  2. Remove node_modules folder
  3. Run npm install again. (took 30 minutes to finish but finally did)

I think Andrey's answer is correct. No error is thrown and it appears to just hang, but while searching for the fix the package finally downloaded and the install process completed. Probably took about 7-8 minutes. Maybe specific to the rxjs package? But I wouldn't recommend removing the package-lock.json file as the fix. You could try deleting your /node_modules folder if it exists already.

Once one of packages seemed to be stuck. I just needed to wait for 15 minutes and it completed.

Related