Wondering if anyone else has seen npm install timeouts and found a solution for them. They only seem to happen in CircleCI for us, they’re inconsistent, but ruin entire builds (the rest of our parallel procs keep running and cost us money…).
#!/bin/bash -eo pipefail
npm install
Too long with no output (exceeded 10m0s)
I’ve turned on verbose logging on npm as well - it does make some progress, but then simply times out. This is with a cache hit as well…
Is there a workaround? Is this a networking issue on npm’s or Circle’s side? Thanks for any clues!
I think this has come up several times, and the trail usually leads to a bug report on a third-party CDN. Have a look to see if NPM has any recent reports of this on their Github issues.
Same issue here. It’s very intermittent, but when it happens it usually reproduces for a few different PRs. My bet is that this lays on the npm side, but I’m not sure…
However, when I rebuild the job, the npm install` takes around a minute only.
In different projects I have a similar problem. It feels like that one specific build node i somehow very slow in installing npm packages. Tho, I cannot see any pattern when this node is used.
For anyone on this thread, is there any such thing as an open source NPM server? I wonder if folks could either use it on their own server, and connect their build process to it, or even spin it up in a CircleCI build and pull their dependencies through it.
It’d act like a proxy - if it has seen something before, it can supply that, and if it has not, it can get it upstream from NPM, maybe even with a retry mechanism.
(The default choice for PHP would probably be the commercial Private Packagist system - does the JS ecosystem have something similar?)