From 988bf26667c21f434230b1a8904b2a2e5b34bb33 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 13 Jul 2026 23:26:20 +0000 Subject: [PATCH] fix: install n2-soul with --ignore-scripts, then upgrade better-sqlite3 n2-soul's npm install fails on Node 26 because its dependency better-sqlite3@11.10.0 cannot compile (V8 API removed GetPrototype). The subsequent upgrade to v12 never runs due to set -eux. Fix: install n2-soul without scripts, then replace better-sqlite3 with v12.11.1 which has prebuilt binaries for Node 26. open-code-ai is installed separately with scripts allowed. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 183927f..7ffa7de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,10 @@ RUN apt-get update && \ groupadd -g 1000 opencode; \ useradd -m -u 1000 -g 1000 -s /usr/bin/bash opencode; \ npm update -g --no-fund --no-audit && \ - npm install -g --no-fund --no-audit --allow-scripts=opencode-ai,better-sqlite3 opencode-ai@1.17.18 n2-soul@9.0.9 && \ - (cd /usr/local/lib/node_modules/n2-soul && npm install --no-fund --no-audit --no-save better-sqlite3@12.11.1) && \ + npm install -g --no-fund --no-audit --ignore-scripts n2-soul@9.0.9 && \ + rm -rf /usr/local/lib/node_modules/n2-soul/node_modules/better-sqlite3 && \ + (cd /usr/local/lib/node_modules/n2-soul && npm install --no-fund --no-audit --no-save --allow-scripts=better-sqlite3 better-sqlite3@12.11.1) && \ + npm install -g --no-fund --no-audit --allow-scripts=opencode-ai opencode-ai@1.17.18 && \ npm cache clean --force && \ chown -R 1000:1000 /usr/local/lib/node_modules/n2-soul/