From 5a322a459370b0551f66f9ffc7d6ae637cbfe382 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Tue, 19 May 2026 09:42:45 +0200 Subject: [PATCH] fix(reactive-resume): install Nitro runtime externals after build bcrypt, sharp, and linkedom are marked as Rolldown externals in apps/web/vite.config.ts and belong to the @reactive-resume/runtime-externals workspace package, but apps/web does not declare that package as a direct dependency. With pnpm strict node_modules, this means the packages are never symlinked into apps/web/node_modules/, causing ERR_MODULE_NOT_FOUND at runtime when the Nitro server tries to import them. Fix: after pnpm run build, use npm to install the three required packages directly into apps/web/node_modules/ without modifying package.json. Applies to both fresh install and update scripts. --- ct/reactive-resume.sh | 4 ++++ install/reactive-resume-install.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 34222c037..623286a42 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -48,6 +48,10 @@ function update_script() { export NODE_ENV="production" $STD pnpm install --frozen-lockfile $STD pnpm run build + msg_info "Installing Nitro Runtime Externals" + cd /opt/reactive-resume/apps/web + $STD npm install --no-save --no-package-lock bcrypt sharp linkedom + cd /opt/reactive-resume mv /opt/reactive-resume.env.bak /opt/reactive-resume/.env msg_ok "Updated Reactive Resume" diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index 0c194fa70..5c79110d9 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -34,6 +34,10 @@ export NODE_ENV="production" export CI="true" $STD pnpm install --frozen-lockfile $STD pnpm run build +msg_info "Installing Nitro Runtime Externals" +cd /opt/reactive-resume/apps/web +$STD npm install --no-save --no-package-lock bcrypt sharp linkedom +cd /opt/reactive-resume mkdir -p /opt/reactive-resume/data msg_ok "Built Reactive Resume"