npm over VPN
tl;dr - if your npm install freezes unpredictably, make sure you're not on a VPN.
VPNs - generally a good idea, and sometimes a VERY good one depending on where you live or the dodginess of your network. It turns out npm
will sometimes fail in a non-obvious way if you're using one, though.
In this case it was literally while trying to build this site locally. When running npm i
dependencies installed until it got to reify:lodash: timing reifyNode:node_modules/neo-async
...and then it would hang forever.
After a bunch of rm
and sudo
commands, frantic Googling, and ill-advised downgrades node of node
and npm
based on search results, I turned off my VPN and the install immediately started working.
Update:
If you need to be running a VPN, using a proxy seems to be a workaround as detailed in this semi-recent Stack Overflow article: https://stackoverflow.com/questions/65604101/nodejs-npm-package-not-working-when-using-vpn
Links
Here's the sweet 11ty project that runs this site with which I experienced this issue