Everytime I try installing packages using npm I get the following error

npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network Invalid response body while trying to fetch aborted 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! /home/delll/.npm/_logs/2020-12-28T19_03_23_239Z-debug.log 

I have also installed docker node image and tried running docker run --rm $(pwd):/app node npm install in my folder, but it returns the same error.

I tried uninstalling node and installed it using NVM, but got the same error.

I have added custom google DNS 8.8.8.8, 8.8.8.4 to my WIFI, I thought it might cause this issue but even after setting the DNS setting to "automatically" I get the same error.

I am on Ubuntu 20.04 Focal. Please let me know if You need more information

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy