From 9cf881a8fd0340f1c34cf66b4095babaaaa24827 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 13 Jul 2026 23:28:16 +0000 Subject: [PATCH] fix: install better-sqlite3 globally, remove local copy in n2-soul npm 10+ rejects --allow-scripts in project-scoped (non-global) installs. Install better-sqlite3@12.11.1 globally with --allow-scripts, then remove the incompatible v11.10.0 from n2-soul's node_modules so Node.js resolves the global v12.11.1 instead. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ffa7de..5728d84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ENV NPM_CONFIG_UPDATE_NOTIFIER=false \ NPM_CONFIG_LOGLEVEL=warn \ NODE_ENV=production -# hadolint ignore=DL3003 + RUN apt-get update && \ apt-get upgrade -y --no-install-recommends ca-certificates && \ rm -rf /var/lib/apt/lists/* && \ @@ -14,8 +14,8 @@ RUN apt-get update && \ 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 --ignore-scripts n2-soul@9.0.9 && \ + npm install -g --no-fund --no-audit --allow-scripts=better-sqlite3 better-sqlite3@12.11.1 && \ 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/