npm connectivity issue when on hotspot wireless

I’m developing a website and frequently run a server and client locally to test. This is a home computer setup with no proxy as far as I know. My setup was working fine for months but shortly after executing "wsl –shutdown" to address a different problem, my server can no longer connect to the internet. The client is fine. Using "ping" to check connectivity never returns any results. I seem to be able to send information, but not receive it as there is always 100% packet loss.

One particularity of my setup is that I exclusively use a mobile hotspot for internet access. One strange thing about this is that my ip address changes every time I project the hotspot.

I was developing on wsl2 inside of Windows 10, but when I couldn’t get that to work, I tried to start developing straight on Windows. But I can’t reach the internet from a cmd or powershell terminal on Windows either.

I’ve tried many things including:

  1. npm config set registry http://registry.npmjs.org/

  2. npm config rm proxy
    npm config rm https-proxy
    npm install [email protected] -g

  3. Adding "namespace 8.8.8.8" to various config files

… and a few other things. None of these seem to have any impact. At this point I may have also worsened the problem by changing settings that I should not have. Any fresh-start solution for either wsl2 for Windows, or just directly on Windows would be greatly appreciated.

Example of Windows Powershell failed command and output:

PS C:UsersuserCode> npm install
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npmjs.org/@hapi%2faddress failed, reason: read ECONNRESET
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'

Source: Windows Questions

LEAVE A COMMENT