'npm install' extremely slow on Windows 'npm install' extremely slow on Windows windows windows

'npm install' extremely slow on Windows


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:

  • search for Windows Defender settings
  • → Virus & threat protection
  • → Virus & threat protection Settings
  • → Exclusions

here add this two paths to your list of excluded realtime protection folders:

C:\Program Files\nodejsC:\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.


I know its just a workaround, but try using the build-in "Windows PowerShell"