fix(ci): copy .npmrc before pnpm install in all Dockerfiles #654

Merged
jason.woltje merged 1 commits from fix/dockerfile-npmrc into main 2026-03-02 01:09:23 +00:00
Owner

The .npmrc file contains supportedArchitectures settings to force pnpm to install glibc x64 binaries for native modules like matrix-sdk-crypto-nodejs.

Without copying this file into the Docker image, pnpm defaults to the platform's native behavior which may skip or install incorrect binaries.

This fixes the production crash:

Root cause: PR #653 added .npmrc with architecture hints but the Dockerfiles never copied it into the image.

Fix: Add before each Scope: all 8 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: node-pty. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed │
│ to run scripts. │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯

. prepare$ husky || true
. prepare: Done
Done in 1.1s using pnpm v10.19.0 in:

  • apps/api/Dockerfile
  • apps/orchestrator/Dockerfile
  • apps/web/Dockerfile (both deps and production stages)
The .npmrc file contains supportedArchitectures settings to force pnpm to install glibc x64 binaries for native modules like matrix-sdk-crypto-nodejs. Without copying this file into the Docker image, pnpm defaults to the platform's native behavior which may skip or install incorrect binaries. This fixes the production crash: **Root cause:** PR #653 added .npmrc with architecture hints but the Dockerfiles never copied it into the image. **Fix:** Add before each Scope: all 8 workspace projects Lockfile is up to date, resolution step is skipped Already up to date ╭ Warning ─────────────────────────────────────────────────────────────────────╮ │ │ │ Ignored build scripts: node-pty. │ │ Run "pnpm approve-builds" to pick which dependencies should be allowed │ │ to run scripts. │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ . prepare$ husky || true . prepare: Done Done in 1.1s using pnpm v10.19.0 in: - apps/api/Dockerfile - apps/orchestrator/Dockerfile - apps/web/Dockerfile (both deps and production stages)
jason.woltje added 1 commit 2026-03-02 01:05:19 +00:00
fix(ci): copy .npmrc before pnpm install in all Dockerfiles
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
79272e1bd8
The .npmrc file contains supportedArchitectures settings to force pnpm
to install glibc x64 binaries for native modules like matrix-sdk-crypto-nodejs.

Without copying this file into the Docker image, pnpm defaults to the
platform's native behavior which may skip or install incorrect binaries.
jason.woltje merged commit 51d46b2e4a into main 2026-03-02 01:09:23 +00:00
Sign in to join this conversation.