While I was installing some packages using npm it just freezed, I'm using npm 10.3.0
and node 21.6.0
in ArchLinux
In other project it took abut 10 minuts and logged:
Using version ^1.28 for laravel/breeze
INFO Installing and building Node dependencies.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@tailwindcss%2fforms failed, reason:
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'
but my network is about 150 Mbps (fast.com)
This one is when I use laravel (starter kid)
/home/abdullajonov/.npm/_logs/2024-01-19T16_28_58_849Z-debug-0.log
gives tonns of logs and I can't put all of them here
There could be IPv6 enabled that prevent npm registry to resolve. So the solution would be to turn IPv6 off in adapter settings. And also try to disable firewall.
To do it:
sudo nano /etc/sysctl.conf
type it
# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and save!
sudo sysctl --system
sudo systemctl stop iptables
then try to install some package using npm
.