From 9d0326e3ea48d30b8dc73bd84251f4922d3a6b85 Mon Sep 17 00:00:00 2001 From: Arlind Date: Wed, 17 Jun 2026 15:07:39 +0200 Subject: [PATCH] fix(deploy): use pnpm 11 allowBuilds key; drop dead package.json pnpm field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pnpm 11 ignores both package.json's pnpm.onlyBuiltDependencies and the pnpm-workspace.yaml onlyBuiltDependencies key — it reads the build allow-list from `allowBuilds` (as written by `pnpm approve-builds`). Switch to that so `pnpm install` compiles better-sqlite3/esbuild/sharp automatically on deploy, and remove the now-ignored package.json field that emitted a warning. Co-Authored-By: Claude Opus 4.8 (1M context) --- package.json | 3 --- pnpm-workspace.yaml | 18 +++++++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index fed1311..6616845 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,5 @@ }, "engines": { "node": ">=22" - }, - "pnpm": { - "onlyBuiltDependencies": ["better-sqlite3", "esbuild", "sharp"] } } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8a0f315..a40c437 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,9 +1,9 @@ -# pnpm 10+ moved several settings out of package.json's "pnpm" field into -# this file. `onlyBuiltDependencies` allow-lists packages permitted to run -# install/build scripts (pnpm now blocks build scripts by default). Without -# this, better-sqlite3's native binary is never compiled and the server -# crashes at runtime with ERR_DLOPEN_FAILED / NODE_MODULE_VERSION mismatch. -onlyBuiltDependencies: - - better-sqlite3 - - esbuild - - sharp +# pnpm 10+ stopped reading build-script settings from package.json's "pnpm" +# field and blocks dependency build scripts by default. pnpm 11 reads the +# allow-list from `allowBuilds` here (captured via `pnpm approve-builds`). +# Without it, better-sqlite3's native binary is never compiled and the SSR +# server crashes at runtime (ERR_DLOPEN_FAILED / NODE_MODULE_VERSION mismatch). +allowBuilds: + better-sqlite3: true + esbuild: true + sharp: true