Andres
April 4, 2025, 10:37pm
1
I’m trying to deploy my Node.js app but when is installing the packages, I get this error:
=> [builder 3/5] RUN yarn cache clean && yarn install --production=false 197.2s
=> => # at Socket._onTimeout (node:net:609:8)
=> => # at listOnTimeout (node:internal/timers:594:17)
=> => # at process.processTimers (node:internal/timers:529:7)
=> => # info Visit yarn install | Yarn for documentation about this command.
=> => # info There appears to be trouble with your network connection. Retrying…
=> => # info There appears to be trouble with your network connection. Retrying…
This is my fly config:
app = "lucira-ai-development"
primary_region = "sea"
[env]
NODE_ENV="production"
SERVER_PORT=8080
[[services]]
internal_port = 80
processes = ["app"]
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[vm]]
memory = "4gb"
cpu_kind = "shared"
cpus = 4
halfer
April 4, 2025, 11:01pm
5
Does your app build and run locally in Docker?
Andres
April 4, 2025, 11:33pm
6
I’m just running the fly deploy command
halfer
April 5, 2025, 7:24am
7
Righto, I would get it working in Docker first; if it won’t work in Docker then it definitely won’t work in Fly. This is a good intermediate test.
Andres
April 5, 2025, 7:42pm
8
I just built the Dockerfile and it is working fine, this is what i have:
FROM debian:bullseye AS base
ARG NODE_VERSION=22.13.0
ARG YARN_VERSION=1.22.22
RUN apt-get update; apt install -y curl wget python-is-python3 pkg-config build-essential nginx
RUN curl https://get.volta.sh | bash
ENV VOLTA_HOME=/root/.volta
ENV PATH=/root/.volta/bin:$PATH
RUN volta install node@${NODE_VERSION} yarn@${YARN_VERSION}
FROM base AS builder
WORKDIR /app
ENV NODE_ENV=production
COPY . .
RUN yarn cache clean && yarn install --production=false
RUN yarn run build
RUN yarn run generate
FROM base AS runner
WORKDIR /app
LABEL fly_launch_runtime="nodejs"
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg \
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /root/.volta /root/.volta
COPY --from=builder /app /app
COPY --from=builder /app/nginx.development.conf /etc/nginx/nginx.conf
ENV NODE_ENV=production
ENV PATH=/root/.volta/bin:$PATH
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
roadmr
April 8, 2025, 1:55pm
9
Hi Andrés,
If you’re still seeing issues (problem with network connection, retrying) can you please try a non-Depot builder?
fly deploy --depot=false
Let me know if that helps.
fpdk
April 8, 2025, 6:37pm
10
Same issue here. Using fly deploy --depot=false
still returns There appears to be trouble with your network connection. Retrying...
fpdk
April 9, 2025, 7:18am
11
It works after adding --network-timeout=300000
(5 minutes) to my yarn install
commands in Docker. I don’t use the --depot=false
argument for fly deploy
.
The deployment takes 10 minutes to complete, where it used to be 2-4 minutes. This is hopefully just some temporary network issues.
system
Closed
April 16, 2025, 7:18am
12
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.