Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 445 Vote(s) - 3.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'npm install' extremely slow on Windows

#1
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?
Reply

#2
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.

npm install package-name --cache "c:\path\to\use\as\dependencies\cache"

this will allow npm download and cache dependencies in the directory you specified.

**3)** another solution for caching npm packages dependencies is **npm lazy**, you may find more information about this at [npm Lazy website][1]

**Note:** the caching process may or may not improve the download speed but it will probably save downloads time when installing or updating your npm packages.


[1]:

[To see links please register here]

Reply

#3
I've been facing the same issue for a while. I was trying out the following

npm i typescript live-server --save-dev


The install would get stuck at it forever. However adding the -verbose flag worked just fine.
Reply

#4
For me it appeared to be a problem with IPv6.

Disabling IPv6 helped immensely for me.
With IPv6 turned on "update-package newtonsoft.json" took 1:45 to time out with the error "update-package : A task was canceled."

With IPv6 disabled "update-package newtonsoft.json" completed in 10 seconds
Reply

#5
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

[To see links please register here]

the issue is quite easily solved by using http:

npm config set registry

[To see links please register here]

--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 ;-)
Reply

#6
Turning off Windows Firewall and Windows Defender Real-time protection did it for me in Windows 10.
Reply

#7
I know its just a **workaround**, but try using the build-in "[Windows PowerShell][1]"


[1]:

[To see links please register here]

Reply

#8
I faced the same issue while creating project while using angular cli "ng new PROJECT_NAME" this command triggers "npm -install" after creation of project, which took too long to install, and got stuck at "Installing packages for tooling via npm" . Follow these which worked for me

1) Check your npm version "npm --version" (must be higher than 2.1.8)Update your npm package by "npm -g install --save latest-version"

2) Remove the progress bar which consumes more time "npm set progress=false"

check this issues if still doesn't fix your problem

[To see links please register here]

[To see links please register here]


Hopefully this sorts the problem Cheers!
Reply

#9
I tried all the config's (proxy, registry, etc) nothing worked for me, so did a complete uninstall and install node & npm. Which helped to solve the issue.
Reply

#10
Turning off the Windows Defender Firewall helped for me.

Because it just doesnt feel right I first added the WIFI to a Private Network (via WIFI settings) and only turned off the Windows Defender for a Private Network instead of all public Networks.

The next step should be: what network traffic causes this and how to add this to the Windows Defender exception rule :)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through