Since my internet connection is slow, i couldn't install packages from npm because of the fact that the npm returns with error as
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/create-react-app (over 30000ms)
i hoped if i increase the waiting time to one minute or more the error will likely be fixed. And since i am on ubuntu 18.04 i couldn't figure out a way to do this.
fetch-retry-maxtimeout This config controls the maximum time (in milliseconds) npm wait before timing out when fetching packages from the registry. The default value is 10000 milliseconds (10 seconds), change it to 600000 or more.
it takes ~5 minutes to download and install.
To solve the issue, try removing the entire node_modules/ folder and the package-lock. json file. Then try running the npm install command again. That may fix the issue.
I don't know how similar to your problem. But I had trouble executing the following command after executing npm install -g npm-check-updates
:
ncu -u
I just kept increasing the timeout after the command until it was fully executed.
ncu -u --timeout 100000
add this to your .npmrc
file:
timeout=60000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With