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.
This commit is contained in:
MickLesk
2026-05-19 09:42:45 +02:00
parent 2944aa9100
commit 5a322a4593
2 changed files with 8 additions and 0 deletions

View File

@@ -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"

View File

@@ -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"