Search code examples
node.jsnpm-install

npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! network Socket timeout


This the error:

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network 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'

I ran npm cache clean --force

Deleted node_modules and package-lock.json and run npm install but still got me that error


Solution

  • Try this answer

    or run npm i -g [email protected]

    i think it's an issue with npm version , 8.5.1 solves the problem in most cases

    basically try earlier versions and i think the problem will be solved