npm ERR! Error: connect ECONNREFUSED when trying to update the npm

Try:

npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/

The first two lines will remove proxy’s if there any.

Third line will make npm download from the official package registry.

Leave a Comment