[QUESTION] <npm install takes so long on windows>
What / Why
When I type "npm install" it takes ~5-10 minutes on windows, on linux is 1 minute
These lines caught my attention:
npm timing action:extract Completed in 234805ms npm timing action:finalize Completed in 21198ms npm timing action:refresh-package-json Completed in 128891ms npm verb unlock done using C:\Users\Hugo\AppData\Roaming\npm-cache_locks\staging-2acf162e836ea64f.lock for C:...\node_modules.staging npm timing stage:executeActions Completed in 395181ms npm info lifecycle [email protected]~prepare: [email protected] npm timing stage:runTopLevelLifecycles Completed in 399677ms npm verb saving []
So, what can I do to fix this very slow performance when 'npm install'?
bump
We were experiencing a similar issue; it turned out to be the result of our antivirus policy. There is a folder which on a linux machine is normally ~/.npm/_lock which our AV needed to ignore.
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Closing: This is an automated message.
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Closing: This is an automated message.
@hugopedro Did you ever find out what was causing this issue?
@hugopedro we are experiencing the same issue here, we are using Centos7 and it take 40 min only in "npm timing action:extract Completed in 2474343ms"
@diegodelico for me this problem was caused by a particular dependency in my package.json, that was attempting to pull from GitHub using the git protocol. This was disabled by GitHub, see https://blog.readthedocs.com/github-git-protocol-deprecation/
Have a look at results from "--loglevel silly" and see if there are any timeouts
@conallprendergast thank you so much!! I found the problem
I just need to find a solution now, but thanks again!
@diegodelico glad to help. Solution should be to use the "git+https://" protocol instead in your package.json
@conallprendergast it works!, thanks again! 💪