Skip to content

Commit 38f2255

Browse files
ralyodioclaude
andcommitted
fix(build): pin pnpm to 10.32.1 (Railway was hitting bleeding-edge)
Previous fixes (move overrides to pnpm-workspace.yaml + add onlyBuiltDependencies for esbuild/msw/sharp) work locally on pnpm 10.32.1 — install --frozen-lockfile finishes clean, no ignored-builds warning. But Railway still failed: [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: esbuild@0.27.2, msw@2.11.3, sharp@0.34.4 Root cause: the Dockerfile runs `corepack prepare pnpm@latest --activate` which pulls whatever's *currently* on the npm registry. The latest pnpm tightened its build-script policy to a hard error even when onlyBuiltDependencies is set — or maybe the YAML key changed names in a newer release. Either way, "@latest" gave us a moving target. Two-part pin so local + CI stay aligned: - Dockerfile: corepack prepare pnpm@10.32.1 (no longer @latest). - package.json: packageManager: pnpm@10.32.1 — corepack will use this for anyone running scripts locally too. Bump intentionally when we validate a newer pnpm. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent af109aa commit 38f2255

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎Dockerfile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ ENV VITE_LOG_LEVEL=$VITE_LOG_LEVEL
6363
WORKDIR /app
6464
# Copy lockfiles first for better caching
6565
COPY pnpm-lock.yaml* package.json pnpm-workspace.yaml ./
66-
RUN corepack enable && corepack prepare pnpm@latest --activate
66+
# Pin pnpm to a known-good version. `pnpm@latest` pulls whatever's on
67+
# the npm registry RIGHT NOW, so Railway can suddenly start failing
68+
# when pnpm ships a stricter minor (e.g. ERR_PNPM_IGNORED_BUILDS hard-
69+
# fail vs warn). Bump intentionally when we test a new version.
70+
RUN corepack enable && corepack prepare pnpm@10.32.1 --activate
6771
RUN pnpm install --frozen-lockfile
6872

6973
# Copy the rest and build

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"engines": {
1010
"node": ">=20.0.0"
1111
},
12+
"packageManager": "pnpm@10.32.1",
1213
"scripts": {
1314
"cli": "node bin/qryptchat-cli.js",
1415
"dev": "vite dev",

0 commit comments

Comments
 (0)