fix(reactive-resume): use pnpm deploy instead of cp -rL for runtime externals

cp -rL follows pnpm's circular symlink chains (sharp, @aws-sdk both have
pkg/node_modules/pkg loops in the virtual store) causing infinite path
recursion and 'File name too long' errors.

Use pnpm deploy --legacy which is exactly what the upstream Dockerfile does:
it creates a flat, real-file node_modules with no symlinks. cp -r (no -L)
then copies it cleanly into apps/web/node_modules/.
This commit is contained in:
MickLesk
2026-05-19 10:08:26 +02:00
parent 6181e5aad4
commit 81737f733f
2 changed files with 6 additions and 10 deletions

View File

@@ -49,11 +49,9 @@ function update_script() {
$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
$STD pnpm --filter=@reactive-resume/runtime-externals deploy --prod --legacy /tmp/rr-runtime
cp -r /tmp/rr-runtime/node_modules/. /opt/reactive-resume/apps/web/node_modules/
rm -rf /tmp/rr-runtime
msg_ok "Deployed Nitro Runtime Externals"
mv /opt/reactive-resume.env.bak /opt/reactive-resume/.env
msg_ok "Updated Reactive Resume"

View File

@@ -35,11 +35,9 @@ export CI="true"
$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
$STD pnpm --filter=@reactive-resume/runtime-externals deploy --prod --legacy /tmp/rr-runtime
cp -r /tmp/rr-runtime/node_modules/. /opt/reactive-resume/apps/web/node_modules/
rm -rf /tmp/rr-runtime
msg_ok "Deployed Nitro Runtime Externals"
mkdir -p /opt/reactive-resume/data
msg_ok "Built Reactive Resume"