mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-19 15:04:56 +02:00
fix(reactive-resume): copy runtime externals with cp -rL instead of symlinks
pnpm symlink chains (our link -> packages/runtime-externals/node_modules/ -> pnpm virtual store) are not reliably followed by Node.js ESM resolution. The upstream Dockerfile uses pnpm deploy which produces real files. Replicate that by using cp -rL to dereference all symlinks and copy the actual package files into apps/web/node_modules/.
This commit is contained in:
@@ -46,9 +46,19 @@ 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 "Deploying Nitro Runtime Externals"
|
||||
RT_MODS="/opt/reactive-resume/packages/runtime-externals/node_modules"
|
||||
WEB_MODS="/opt/reactive-resume/apps/web/node_modules"
|
||||
for pkg in bcrypt sharp linkedom ioredis; do
|
||||
[ -d "${RT_MODS}/${pkg}" ] && cp -rL "${RT_MODS}/${pkg}" "${WEB_MODS}/${pkg}"
|
||||
done
|
||||
if [ -d "${RT_MODS}/@aws-sdk" ]; then
|
||||
mkdir -p "${WEB_MODS}/@aws-sdk"
|
||||
cp -rL "${RT_MODS}/@aws-sdk/client-s3" "${WEB_MODS}/@aws-sdk/client-s3"
|
||||
fi
|
||||
msg_ok "Deployed Nitro Runtime Externals"
|
||||
mv /opt/reactive-resume.env.bak /opt/reactive-resume/.env
|
||||
msg_ok "Updated Reactive Resume"
|
||||
|
||||
|
||||
@@ -32,9 +32,19 @@ 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 "Deploying Nitro Runtime Externals"
|
||||
RT_MODS="/opt/reactive-resume/packages/runtime-externals/node_modules"
|
||||
WEB_MODS="/opt/reactive-resume/apps/web/node_modules"
|
||||
for pkg in bcrypt sharp linkedom ioredis; do
|
||||
[ -d "${RT_MODS}/${pkg}" ] && cp -rL "${RT_MODS}/${pkg}" "${WEB_MODS}/${pkg}"
|
||||
done
|
||||
if [ -d "${RT_MODS}/@aws-sdk" ]; then
|
||||
mkdir -p "${WEB_MODS}/@aws-sdk"
|
||||
cp -rL "${RT_MODS}/@aws-sdk/client-s3" "${WEB_MODS}/@aws-sdk/client-s3"
|
||||
fi
|
||||
msg_ok "Deployed Nitro Runtime Externals"
|
||||
mkdir -p /opt/reactive-resume/data
|
||||
msg_ok "Built Reactive Resume"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user