Description
Issue description
Hi there, greetings! i got the error below when trying to build the docker image using the Dockerfile you provided:
[+] Building 28.2s (16/18) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 589B 0.0s
=> [internal] load metadata for docker.io/nginxinc/nginx-unprivileged:stable 0.6s
=> [internal] load metadata for docker.io/library/node:lts-alpine 0.8s
=> [auth] nginxinc/nginx-unprivileged:pull token for registry-1.docker.io 0.0s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 112B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 10.39kB 0.0s
=> [production 1/4] FROM docker.io/nginxinc/nginx-unprivileged:stable@sha256:0d47c5a38a37313063a86803e7332fbfe598360af8971e6565abf90607f93a82 0.0s
=> [base 1/1] FROM docker.io/library/node:lts-alpine@sha256:6e80991f69cc7722c561e5d14d5e72ab47c0d6b6cfb3ae50fb9cf9a7b30fdf97 0.0s
=> CACHED [production 2/4] WORKDIR /app 0.0s
=> CACHED [deps 1/3] WORKDIR /app 0.0s
=> CACHED [deps 2/3] COPY package.json pnpm-lock.yaml ./ 0.0s
=> CACHED [deps 3/3] RUN corepack enable pnpm && pnpm install --frozen-lockfile 0.0s
=> CACHED [builder 2/4] COPY --from=deps /app/node_modules ./node_modules 0.0s
=> CACHED [builder 3/4] COPY . . 0.0s
=> ERROR [builder 4/4] RUN corepack enable pnpm && pnpm run build 27.3s
[builder 4/4] RUN corepack enable pnpm && pnpm run build:
0.989 ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.1.4.tgz
2.307
2.307 > json-crack@0.0.0 build /app
2.307 > next build
2.307
3.063 ▲ Next.js 14.2.10
3.064 - Environments: .env
3.064
3.064 Linting and checking validity of types ...
9.597 Creating an optimized production build ...
12.53 (node:27) [DEP0040] DeprecationWarning: Thepunycode
module is deprecated. Please use a userland alternative instead.
12.53 (Usenode --trace-deprecation ...
to show where the warning was created)
12.99 request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason:
12.99
12.99 Retrying 1/3...
12.99 request to https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200..800&display=swap failed, reason:
12.99
12.99 Retrying 1/3...
13.37 request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason:
13.37
13.37 Retrying 2/3...
13.37 request to https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200..800&display=swap failed, reason:
13.37
13.37 Retrying 2/3...
14.81 request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason:
14.81
14.81 Retrying 3/3...
14.81 request to https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200..800&display=swap failed, reason:
14.81
14.81 Retrying 3/3...
16.04 FetchError: request to https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap failed, reason:
16.04 at ClientRequest. (/app/node_modules/.pnpm/next@14.2.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/node-fetch/index.js:1:66160)
16.04 at ClientRequest.emit (node:events:524:28)
16.04 at ClientRequest.emit (node:domain:489:12)
16.04 at emitErrorEvent (node:_http_client:104:11)
16.04 at TLSSocket.socketErrorListener (node:_http_client:512:5)
16.04 at TLSSocket.emit (node:events:524:28)
16.04 at TLSSocket.emit (node:domain:489:12)
16.04 at emitErrorNT (node:internal/streams/destroy:170:8)
16.04 at emitErrorCloseNT (node:internal/streams/destroy:129:3)
16.04 at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
16.04 type: 'system',
16.04 errno: 'ETIMEDOUT',
16.04 code: 'ETIMEDOUT'
16.04 }
16.04 FetchError: request to https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200..800&display=swap failed, reason:
16.04 at ClientRequest. (/app/node_modules/.pnpm/next@14.2.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/node-fetch/index.js:1:66160)
16.04 at ClientRequest.emit (node:events:524:28)
16.04 at ClientRequest.emit (node:domain:489:12)
16.04 at emitErrorEvent (node:_http_client:104:11)
16.04 at TLSSocket.socketErrorListener (node:_http_client:512:5)
16.04 at TLSSocket.emit (node:events:524:28)
16.04 at TLSSocket.emit (node:domain:489:12)
16.04 at emitErrorNT (node:internal/streams/destroy:170:8)
16.04 at emitErrorCloseNT (node:internal/streams/destroy:129:3)
16.04 at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
16.04 type: 'system',
16.04 errno: 'ETIMEDOUT',
16.04 code: 'ETIMEDOUT'
16.04 }
26.76 Failed to compile.
26.76
26.76 src/layout/Landing/HeroSection.tsx
26.76next/font
error:
26.76 Failed to fetchPlus Jakarta Sans
from Google Fonts.
26.76
26.76 src/layout/PageLayout/index.tsx
26.76next/font
error:
26.76 Failed to fetchInter
from Google Fonts.
26.76
26.76
26.76 > Build failed because of webpack errors
26.91 ELIFECYCLE Command failed with exit code 1.
Dockerfile:14
12 | COPY --from=deps /app/node_modules ./node_modules
13 | COPY . .
14 | >>> RUN corepack enable pnpm && pnpm run build
15 |
16 | # Stage 3: Production image
ERROR: failed to solve: process "/bin/sh -c corepack enable pnpm && pnpm run build" did not complete successfully: exit code: 1
It seems we failed to fetch the google fonts. Please advise, thank you and merry christmas in advance 😊
Media & Screenshots
Operating system
-
OS: [e.g. iOS]:
-
Browser [e.g. chrome, safari]:
-
Any other details...
Priority this issue should have
Medium (should be fixed soon)
Activity
Prateek-Wayne commentedon May 24, 2025
Hi @guguji666666
It seems to be resolved :)