NPM install hangs when installing packages

13,624

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)
Share:
13,624

Related videos on Youtube

Vugar Abdullayev
Author by

Vugar Abdullayev

I am Front End Developer focused with Angular who is passionate about building websites using latest technologies. I am also a Liverpool fan :)

Updated on May 01, 2022

Comments

  • Vugar Abdullayev
    Vugar Abdullayev 13 days

    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 [email protected]

    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

    • Vugar Abdullayev
      Vugar Abdullayev over 3 years
      Hi Vino. Already solved problem. Remove package-lock.json and node-modules. Then run npm install again.
  • Muhammad Azizi Abdul Aziz
    Muhammad Azizi Abdul Aziz over 2 years
    I know this is old, but I just want to point out what works for me. If above steps does not work, 1. Try placing your package-lock.json into the folder again, 2. Run npm install Works for me in less than 3 minutes.
  • unity100
    unity100 5 months
    Other solutions on the web did not work for me. This did. Thanks Vugar.

Related