Skip to content

Commit a872861

Browse files
junzero741claude
andcommitted
fix(docker): upgrade to Node.js 22 for ESM require() support
nanoid v5 and express-rate-limit v8 are ESM-only but esbuild outputs CJS require() calls. Node.js 20 crashes with ERR_REQUIRE_ESM; Node.js 22.12+ supports require() of ESM modules natively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8362440 commit a872861

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-slim AS builder
1+
FROM node:22-slim AS builder
22

33
WORKDIR /app
44

@@ -27,7 +27,7 @@ RUN pnpm nx build backend
2727
RUN pnpm nx prune backend
2828

2929
# --- Production stage ---
30-
FROM node:20-slim
30+
FROM node:22-slim
3131

3232
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
3333

0 commit comments

Comments
 (0)