Remote build failing with network connectivity timeout

I have successfully completed multiple deploys of the project, but builds are now failing with the same error message each time. I have not made changes to fly.toml. This is a REMIX project and builds fine locally on my machine.

flyctl --app my-app-name deploy .
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-sparkling-dream-9394 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 8.7s (0/1)
[+] Building 508.2s (9/21)
 => [internal] load remote build context                                                                                                                                                                                           0.0s
 => copy /context /                                                                                                                                                                                                                1.1s
 => [internal] load metadata for docker.io/library/node:16-bullseye-slim                                                                                                                                                           0.0s
 => [base 1/2] FROM docker.io/library/node:16-bullseye-slim                                                                                                                                                                        0.0s
 => CACHED [base 2/2] RUN apt-get update && apt-get install -y openssl                                                                                                                                                             0.0s
 => CACHED [deps 1/4] RUN mkdir /app                                                                                                                                                                                               0.0s
 => CACHED [deps 2/4] WORKDIR /app                                                                                                                                                                                                 0.0s
 => CACHED [deps 3/4] ADD package.json package-lock.json ./                                                                                                                                                                        0.0s
 => ERROR [deps 4/4] RUN npm install --production=false                                                                                                                                                                          506.3s
------
 > [deps 4/4] RUN npm install --production=false:
#11 506.3 npm ERR! code ETIMEDOUT
#11 506.3 npm ERR! syscall connect
#11 506.3 npm ERR! errno ETIMEDOUT
#11 506.3 npm ERR! network request to https://registry.npmjs.org/zwitch/-/zwitch-2.0.2.tgz failed, reason: connect ETIMEDOUT 104.16.26.35:443
#11 506.3 npm ERR! network This is a problem related to network connectivity.
#11 506.3 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#11 506.3 npm ERR! network
#11 506.3 npm ERR! network If you are behind a proxy, please make sure that the
#11 506.3 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#11 506.3
#11 506.3 npm ERR! A complete log of this run can be found in:
#11 506.3 npm ERR!     /root/.npm/_logs/2022-02-16T20_39_02_170Z-debug.log
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c npm install --production=false]: exit code: 1

Hi! It looks like a network issue, could be the network connection between the builder host and the npm.
I’d recommend either deleting the builder or installing docker locally and running fly deploy --local-only

Deleting the builder fixed the issue. Thank you!

1 Like