npm install not installing packages

Viewed 1409

I've tried to get packages to install by running npm install discord.js for example and it doesn't install it. Below is the terminal.

npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz 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:

This is after a 5-10 minute wait period. I've done almost everything imaginable. Any help would be appreciated. Thanks! XRift_0

Edit
After disabling Kaspersky, it worked. How do I make it work with Kaspersky enabled?

3 Answers

Its trying to use the proxy config set in your PC.

Check the .npmrc file available at C:\Users\yourprofile.npmrc.

Add or remove the proxy config accordingly or delete the .npmrc

proxy=http://proxyserveripordn:proxyport/

https-proxy=http://proxyserveripordns:proxyport

http-proxy=http://proxyusername:proxyuserpassword@proxyserveripordns:proxyport

strict-ssl=false

Try:

npm config set registry http://registry.npmjs.org/

So that npm requests for http url instead of https.

and after this, try the same npm install discord.js command.

This version has been deprecated , now this is no longer in npm

This version has been deprecated

Related