Deploys getting stuck on npm install

Our production deploys are timing out on this step but our staging deploys are working just fine. They use the exact same fly config and Dockerfile. Any insight into what could be going on?

This is flyctl0.0.475 run through a github action with flyctl deploy --remote-only -a app

 > [js-deps 3/4] RUN npm install:
#17 425.3 npm ERR! errno ETIMEDOUT
#17 425.3 npm ERR! network request to https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:443
#17 425.3 npm ERR! network This is a problem related to network connectivity.
#17 425.3 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#17 425.3 npm ERR! network 
#17 425.3 npm ERR! network If you are behind a proxy, please make sure that the
#17 425.3 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#17 425.3 
#17 425.3 npm ERR! A complete log of this run can be found in:
#17 425.3 npm ERR!     /root/.npm/_logs/2023-03-03T20_18_02_494Z-debug-0.log

These steps from the fly support team resolved the issue:

1. Make sure you have a recent flyctl (v0.0.443 at least, safer to get the very latest though)
2. Find your builder machine ID via: `fly machine ls -a <your-fly-builder-app-name>`
3. Clone the machine in a new region: `fly machine clone <machine-id> --region ewr -a <your-fly-builder-app-name>` (can be a region other than ewr, ideally in the US).
4. Destroy your previous machine (`fly machine remove <old-machine-id>`)
5. Destroy your old volume (`fly volume delete <old-volume-id>`)

thanks yall!

1 Like