mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-19 15:04:56 +02:00
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:
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user