From 500653301e85a46c004703c1a5b173a009f81678 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Tue, 7 Apr 2026 15:07:50 +0200 Subject: [PATCH] fix: force pnpm rebuild better-sqlite3 for native binding pnpm install doesn't compile native bindings in Alpine. Explicit rebuild ensures the .node file is generated. Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c5d04d..4fda72e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,8 @@ RUN apk add --no-cache python3 make g++ WORKDIR /app RUN corepack enable pnpm COPY package.json pnpm-lock.yaml ./ -RUN pnpm install --frozen-lockfile -# Verify native binding was built -RUN find node_modules -name "better_sqlite3.node" && echo "--- binding found ---" +RUN pnpm install --frozen-lockfile && pnpm rebuild better-sqlite3 +RUN find node_modules -name "better_sqlite3.node" || (echo "FATAL: binding not found" && exit 1) COPY . . RUN pnpm run build # Keep only build tools cleanup that won't remove sqlite-libs