HowToDoInJava

  • Python
  • Java
  • Spring Boot
  • Dark Mode
Home / Angular / [Solved] Npm install hung or takes too long time

[Solved] Npm install hung or takes too long time

While working on Node you may be downloading various npm packages. Sometimes the download process just hung and does not move forward. You may also see errors related to non-reachable registry.npmjs.org URL.

Error

Typically error logs look like this:

E:\ngexamples\helloworld>npm install -g webpack
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz failed, reason: connect ETIMEDOUT 104.18.95.96:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lokesh\AppData\Roaming\npm-cache\_logs\2018-06-18T16_50_17_569Z-debug.log

Solution

Mostly (and for me as well) this error is due to incorrect proxy settings. Verify network proxy settings are correct.

Else try removing proxy settings using below commands and try again.

$ npm config rm proxy
$ npm config rm https-proxy

Hopefully above commands will sole this error for you as well.

Happy Learning !!

Was this post helpful?

Let us know if you liked the post. That’s the only way we can improve.
TwitterFacebookLinkedInRedditPocket

About Lokesh Gupta

A family guy with fun loving nature. Love computers, programming and solving everyday problems. Find me on Facebook and Twitter.

Feedback, Discussion and Comments

  1. Nilesh Kachave

    April 24, 2020

    I was facing same issue when i set password to my Wi-Fi the issue get resolved for me

  2. Varsha M

    April 16, 2020

    Thanks a ton! It worked for me as well. πŸ™‚

  3. Yassine

    April 15, 2020

    My problem was fixed !
    Thank you very much πŸ™‚

  4. Samson Immanuel K

    February 7, 2020

    Thanks!! This solved my problem πŸ™‚

  5. Vinay

    January 12, 2020

    Thanks. This resolved my problem too!

  6. Khayal Pacha

    December 30, 2019

    Thanks a lot!
    It solve my problem!

Comments are closed on this article!

Search Tutorials

Angular Tutorial

  • Angular – Workspace Setup
  • Angular – Npm install hung
  • Angular – Mock REST Server
  • Angular – Interpolation
  • Angular – Components
  • Angular – Templates
  • Angular – Services
  • Angular – RxJS Observable

AngularJS Tutorials

  • AngularJS – HelloWorld Example
  • AngularJS – jQuery Lite
  • AngularJS – Services
  • AngularJS – RESTful API Example

Meta Links

  • About Me
  • Contact Us
  • Privacy policy
  • Advertise
  • Guest and Sponsored Posts

Recommended Reading

  • 10 Life Lessons
  • Secure Hash Algorithms
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices Guide
  • Microservices Tutorial
  • REST API Tutorial
  • How to Start New Blog

Copyright © 2020 · HowToDoInjava.com · All Rights Reserved. | Sitemap

  • Sealed Classes and Interfaces