0

I had been using VS Code for my development works, when all of a sudden my npm install commands stopped working and started giving me errors like below:

⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session abcd123456789efg

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/passport failed, reason: read ECONNRESET
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!     /Users/ajaywadhwani/.npm/_logs/2019-01-27T22_33_38_087Z-debug.log

I am not behind any proxy by any chance.

Interestingly, a ping to the link https://registry.npmjs.org/passport through my browser takes me to the webpage with the content, and can ping the website through terminal.

Kindly advise and suggest.

  • Possible duplicate of [npm not working - “read ECONNRESET”](https://stackoverflow.com/questions/18419144/npm-not-working-read-econnreset). – Sol Jan 28 '19 at 16:26
  • I'm facing same problem, anything helped you ? – Vasanth Dec 11 '20 at 11:56

1 Answers1

0

Try updating to the latest npm with the command npm install npm@latest -g.

I would also make sure there's no proxy set up by going to System Preferences > Network > your connection (Wi-Fi, for example) > Advanced... > Proxies and looking for any checked boxes.

Please let me know if these solutions work or not.

Sol
  • 344
  • 4
  • 17
  • I tried doing the above and have checked the Proxy settings on my Wireless network too... This doesnt seem to work. At the same time, I uninstalled and re-installed Node too. – Ajay Wadhwani Jan 28 '19 at 09:07
  • It looks like there is [another question](https://stackoverflow.com/questions/18419144/npm-not-working-read-econnreset) like this one. Maybe one of the answers there will help? – Sol Jan 28 '19 at 16:28