Installing packages (npm)...npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT
Problem
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 npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/postcss-import: Socket timeout npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! /home/bentex/.npm/_logs/2022-03-11T08_41_06_921Z-debug-0.log ā Package install failed, see above. The Schematic workflow failed. See above. Expected Behavior I expect to create a new angular project using the command ng new but seems theres a socket timeout each time i try Steps To Reproduce 1. In this environment... linux distro parrotOs 2. With this config... 3. Run '...' ng new .. 4. See error... Environment npm -v 8.3.1 $node -v v17.4.0 "user" config from /home/bentex/.npmrc legacy-peer-deps = true ; node bin location = /home/bentex/.nvm/versions/node/v17.4.0/bin/node
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Installing packages (npm)...npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT
I just had this issue and it helped changing timeouts: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000
Trust Score
7 verifications
- 1
I just had this issue and it helped changing timeouts:
I just had this issue and it helped changing timeouts:
- 2
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
Validation
Resolved in npm/cli GitHub issue #4553. Community reactions: 42 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep