[BUG] npm ERR! code ECONNRESET in jenkins pipeline with Node 16.13.1 and NPM 8.1.2
Is there an existing issue for this?
- [X] I have searched the existing issues
This issue exists in the latest npm version
- [X] I am using the latest npm
Current Behavior
We are facing below issue in our pipeline during npm install. But it works fine in our local machine.
00:45:05 npm timing reify:loadTrees Completed in 165792ms
00:45:05 npm timing reify:diffTrees Completed in 38ms
00:45:05 npm timing reify:retireShallow Completed in 1ms
00:45:06 npm timing reify:createSparse Completed in 428ms
00:45:06 npm timing reify:trashOmits Completed in 5ms
00:45:06 npm timing reify:loadBundles Completed in 0ms
00:45:53 npm verb stack Error: aborted
00:45:53 npm verb stack at connResetException (node:internal/errors:691:14)
00:45:53 npm verb stack at TLSSocket.socketCloseListener (node:_http_client:407:19)
00:45:53 npm verb stack at TLSSocket.emit (node:events:402:35)
00:45:53 npm verb stack at node:net:687:12
00:45:53 npm verb stack at Socket.done (node:_tls_wrap:580:7)
00:45:53 npm verb stack at Object.onceWrapper (node:events:510:26)
00:45:53 npm verb stack at Socket.emit (node:events:402:35)
00:45:53 npm verb stack at TCP.
Expected Behavior
Smooth npm install is expected.
Steps To Reproduce
- In this environment... Jenkins
- With this config... Using internal artifactory
- Run '...' npm install "--no-audit" "--no-optional" "--no-shrinkwrap" "--no-package-lock" "--loglevel" "verbose"
- See error... error added in current behaviour
Environment
- npm: 8.1.2
- Node.js: 16.13.1
- OS Name: Linux
- System Model Name: Jenkins Pipeline
@sandeepdussa, Implementing the following configurations solved my headache on npm verb stack Error: Socket timeout & npm verb stack Error: aborted for a similar scenario.
- Although I believe that decreasing the
maxsockets(default 15) did the trick, but also sharing the rest of the parameters that may be helpful:
maxsockets=10 fetch-retries=5 fetch-retry-factor=20 fetch-timeout=3600000 fetch-retry-mintimeout=3000000 fetch-retry-maxtimeout=3500000
@sandeepdussa can you try replicating this problem on the latest version of npm? (ie. npm i -g npm)
Closing due to age. If this is still a problem please feel free to reopen this issue, or create a new issue w/ steps to reproduce.