Compare commits

..

6 Commits

Author SHA1 Message Date
MickLesk
87c26b56bd fix(reactive-resume): update for v5.1.4 compatibility
- Replace obsolete PRINTER_ENDPOINT with ENCRYPTION_SECRET in .env
  (PDF generation moved client-side in v5.1.0; AI providers require
  ENCRYPTION_SECRET since v5.1.4)
- Add commented REDIS_URL for the new AI Agent workspace (optional)
- Inject ENCRYPTION_SECRET into existing installs on update if missing
2026-05-19 10:21:22 +02:00
MickLesk
81737f733f 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/.
2026-05-19 10:08:26 +02:00
MickLesk
6181e5aad4 fix(reactive-resume): drop @aws-sdk/client-s3 from cp -rL step
@aws-sdk/client-s3 has a pathologically deep pnpm virtual store symlink
tree; cp -rL follows the chain into thousands of nested client-s3 dirs
causing 'File name too long' errors. S3 is an optional storage backend
so skip it. bcrypt, sharp, linkedom and ioredis are unaffected.
2026-05-19 10:04:17 +02:00
MickLesk
0938891e77 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/.
2026-05-19 09:58:36 +02:00
MickLesk
f52b055350 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.
2026-05-19 09:46:37 +02:00
MickLesk
5a322a4593 fix(reactive-resume): install Nitro runtime externals after build
bcrypt, sharp, and linkedom are marked as Rolldown externals in
apps/web/vite.config.ts and belong to the @reactive-resume/runtime-externals
workspace package, but apps/web does not declare that package as a direct
dependency. With pnpm strict node_modules, this means the packages are never
symlinked into apps/web/node_modules/, causing ERR_MODULE_NOT_FOUND at
runtime when the Nitro server tries to import them.

Fix: after pnpm run build, use npm to install the three required packages
directly into apps/web/node_modules/ without modifying package.json.

Applies to both fresh install and update scripts.
2026-05-19 09:42:45 +02:00
2 changed files with 21 additions and 2 deletions

View File

@@ -48,7 +48,17 @@ function update_script() {
export NODE_ENV="production"
$STD pnpm install --frozen-lockfile
$STD pnpm run build
msg_info "Deploying Nitro Runtime Externals"
$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
# Inject ENCRYPTION_SECRET if missing (required for AI providers since v5.1.4)
if ! grep -q '^ENCRYPTION_SECRET=' /opt/reactive-resume/.env; then
ENCRYPTION_SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_SECRET=${ENCRYPTION_SECRET}" >> /opt/reactive-resume/.env
fi
msg_ok "Updated Reactive Resume"
msg_info "Updating Service"

View File

@@ -34,11 +34,17 @@ export NODE_ENV="production"
export CI="true"
$STD pnpm install --frozen-lockfile
$STD pnpm run build
msg_info "Deploying Nitro Runtime Externals"
$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"
msg_info "Configuring Reactive Resume"
AUTH_SECRET=$(openssl rand -hex 32)
ENCRYPTION_SECRET=$(openssl rand -hex 32)
cat <<EOF >/opt/reactive-resume/.env
# Reactive Resume v5 Configuration
@@ -54,8 +60,8 @@ DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAM
# Authentication Secret (do not change after initial setup)
AUTH_SECRET=${AUTH_SECRET}
# Printer (headless Chromium for PDF generation)
PRINTER_ENDPOINT=http://127.0.0.1:9222
# Encryption Secret (required for saved AI providers, do not change after initial setup)
ENCRYPTION_SECRET=${ENCRYPTION_SECRET}
# Storage: uses local filesystem (/opt/reactive-resume/data) when S3 is not configured
# S3_ACCESS_KEY_ID=
@@ -78,6 +84,9 @@ PRINTER_ENDPOINT=http://127.0.0.1:9222
# GOOGLE_CLIENT_ID=
# GOOGLE_CLIENT_SECRET=
# AI Agent (optional, required for the Agent workspace feature)
# REDIS_URL=redis://localhost:6379
# Feature Flags
# FLAG_DISABLE_SIGNUPS=false
# FLAG_DISABLE_EMAIL_AUTH=false