The Easiest Way to Fix NPM “ECONNRESET” Error

If you live in a country with limited access to the internet, and you happen to be a programer like I am, you may encounter the subject error message.

What this means is that you are unable to access the resources, namely the package that you are attempting to download locally.

Using a VPN may seem like an easy fix, but terminals, such as bash and powershell, do not work as well with VPN. In addition, even if you are able to route your traffic, chances are you will be blocked because of how GREAT the firewall is.

As a result, we have other options, such as setting your npm origin to mirror sites in your country, or mirrors that are not blocked.

However, I don’t want to go that route, I dislike getting packages from mirror sites.

Then we have another option, which is to manually download the package from the source and put it in the npm cache folder so that when you do “npm i”, there will be no need for the internet.

To illustrate, here’s how it works on my Windows computer:

Step1: Navigate to npm cache bycd ~cd /AppData/Roaming/npm-cacheStep2: CD to the targarted package folder, such ascd _libvipsStep3: Manually download the package from githubStep4: Put the zip folder into the folder


coder, founder and explorer.

Love podcasts or audiobooks? Learn on the go with our new app.

Your First Deep Learning Project Is an API Call Away

The NPM Lifecycle Event variable

Laravel Development Company

Virtualization of angular ngFor — Welcome to the pure ngFor replacement — ngVFor !

Awesome AdonisJs & Best Practices #1

Javascript Reduce

How to print Reactive Form data with Custom Styling using React-to-print and Redux.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


coder, founder and explorer.

More from Medium

Ironhack Full Stack Developer Bootcamp — Week 2 — Calvin Torra

React Router DOM version 6 updates and changes

Top 5 React Js Interview Question For Fresher

Reacting to ReactJS!