From 0938891e7739d4131ad1c976f525c12217e4f8bb Mon Sep 17 00:00:00 2001 From: MickLesk Date: Tue, 19 May 2026 09:58:36 +0200 Subject: [PATCH] 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/. --- ct/reactive-resume.sh | 12 +++++++++++- install/reactive-resume-install.sh | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index 9d6561f2b..7e8b6a740 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -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" diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index a54d35764..894fba5bd 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -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"