Skip to content

Commit a31f1d5

Browse files
authored
Fix Docker build with pnpm@latest (#27)
* Move pnpm overrides to pnpm-workspace.yaml The 'pnpm' field in package.json is no longer read by recent pnpm versions (used by the Dockerfile via 'pnpm@latest'), causing ERR_PNPM_LOCKFILE_CONFIG_MISMATCH on 'pnpm install --frozen-lockfile'. Move the overrides to pnpm-workspace.yaml, the new home for these settings, and update the Dockerfile to copy it. * Skip dependency lifecycle scripts in Docker build pnpm 11 (used by 'pnpm@latest' in the Dockerfile) treats ignored build scripts as a hard error rather than the warning pnpm 10 produced, blocking the Docker build on esbuild's postinstall. Pass --ignore-scripts to explicitly skip dependency lifecycle scripts (esbuild's per-platform binaries are already provided by its @esbuild/* sub-packages, so its postinstall is not required).
1 parent 59d4bd8 commit a31f1d5

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

frontend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
66

77
WORKDIR /app
88

9-
COPY package.json pnpm-lock.yaml ./
10-
RUN pnpm install --frozen-lockfile
9+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
10+
RUN pnpm install --frozen-lockfile --ignore-scripts
1111

1212
COPY . .
1313

frontend/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,5 @@
5656
"orval": "^8.5.1",
5757
"typescript": "~5.9.3",
5858
"vite": "^7.3.3"
59-
},
60-
"pnpm": {
61-
"overrides": {
62-
"brace-expansion@>=2.0.0 <2.0.3": ">=2.0.3",
63-
"socket.io-parser@>=4.0.0 <4.2.6": ">=4.2.6"
64-
}
6559
}
6660
}

frontend/pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
overrides:
2+
brace-expansion@>=2.0.0 <2.0.3: '>=2.0.3'
3+
socket.io-parser@>=4.0.0 <4.2.6: '>=4.2.6'

0 commit comments

Comments
 (0)