fix(reactive-resume): use shamefully-hoist to expose pnpm externals

Replace the broken npm-install workaround with a simpler approach:
write shamefully-hoist=true to .npmrc before pnpm install. This causes
pnpm to hoist all packages to root node_modules/, including bcrypt, sharp,
linkedom etc. (deps of @reactive-resume/runtime-externals), making them
resolvable by the Nitro server at runtime.

The upstream repo has no .npmrc, so git reset --hard leaves this file
untouched on updates. The file is written before each pnpm install in
both install and update scripts to ensure it is always in place.
This commit is contained in:
MickLesk
2026-05-19 09:46:37 +02:00
parent 5a322a4593
commit f52b055350
2 changed files with 2 additions and 8 deletions

View File

@@ -46,12 +46,9 @@ function update_script() {
corepack prepare --activate
export CI="true"
export NODE_ENV="production"
printf 'shamefully-hoist=true\n' >/opt/reactive-resume/.npmrc
$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

@@ -32,12 +32,9 @@ corepack enable
corepack prepare --activate
export NODE_ENV="production"
export CI="true"
printf 'shamefully-hoist=true\n' >/opt/reactive-resume/.npmrc
$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"