For me is npm install
extremely slow. I'm using Windows 8.1 with the latest npm version. My connection speed is around 100Mbit/s.
The project I'm trying to install has around 20 packages/dependencies and it takes around 30 Minutes to install all dependencies ...
Does anyone have a clue?
It seems like npm do not deal well with internet connections and can sometimes end in such situation. 1) I'll advice you to check if your firewall or antivirus is not performing any scan or filtering which may slow down npm install. 2) You may also use caching from npm like below.
If you find that npm is running slow and it isn't your computer or internet, it is most likely because of a severely outdated version.
it takes ~5 minutes to download and install.
I ran into the same problem, using --verbose
as peterh mentioned showed me the source of the problem: I am behind a proxy, which uses its own certificates for https-connections. According to user "Mletter1" on https://github.com/npm/npm/issues/8872 the issue is quite easily solved by using http:
npm config set registry http://registry.npmjs.org/ --global
And voilà, it's fast again. Of course you should only do this, if you're ok with cleartext npm infos over the net ;-)
Warning regarding security: this is an insecure approach if you don't use any other means of antivirus protection.
From eternity → to 5 seconds builds:
here add this two paths to your list of excluded realtime protection folders:
C:\Program Files\nodejs C:\Users\<your username>\AppData\Roaming\npm
PS: replace the <your username>
with your respective User folder name.
If you're wandering why you can't find the AppData folder in Explorer, make sure to check View options for hidden folders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With