- Disabled Nuxt Content - Was triggering memory-intensive prerenderer
- Disabled nuxt-og-image - Was triggering memory-intensive prerenderer
- Using
vercelpreset - Better memory-efficient chunking thannode-server - Externalized heavy modules - sharp, pdfmake, jspdf, html2canvas, qrcode
- Fixed import in
server/api/invoices/[id]/download.get.ts - Changed from
~/server/utils/stripeto relative../../../utils/stripe - Nuxt 4's
~alias points toapp/directory, not project root
- Fixed color prop values across 30+ components
red→errorgreen→successblue→infogray→neutralyellow→warning
- Updated
render.yamlwith all required environment variables - Added Mailgun, Twilio, OAuth configs
- Build command uses memory optimization flags
- Push these changes to the
refractor-v2branch - In Render Dashboard, click "New +" → "Blueprint"
- Connect your GitHub repo
- Render will auto-detect
render.yamland configure everything
- Create new Web Service
- Connect to
refractor-v2branch - Settings:
- Build Command:
npm ci && NODE_OPTIONS="--max-old-space-size=4096" npm run build:render - Start Command:
node .vercel/output/functions/__fallback.func/index.mjs - Health Check:
/api/health
- Build Command:
Go to Render Dashboard → Environment and add:
# Database
ME_CONFIG_MONGODB_URL=mongodb+srv://...
# Auth
JWT_SECRET=your-secret-key
# AWS S3
AWS_REGION=eu-west-1
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_BUCKET_NAME=...
# Stripe
STRIPE_SECRET_KEY=sk_...
STRIPE_WEBHOOK_SECRET=whsec_...
NUXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_...
# Mailgun
API_KEY_MAILGUN=...
MG_DOMAIN=...
# Twilio (optional)
TWILIO_SID=...
TWILIO_TOKEN=...
TWILIO_WHATSAPP_FROM=...
# OAuth (optional)
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
# Site URL (auto-set by Render)
NUXT_PUBLIC_SITE_URL=https://v9planes-app.onrender.com-
Nuxt Content Disabled: The blog/content features won't work. To re-enable, you'll need a larger Render plan (2GB+ RAM).
-
OG Images Disabled: Social sharing images won't auto-generate.
-
Build Time: ~30-60 seconds on Render standard plan
-
Memory Usage: Build stays under 4GB with current optimizations
If you upgrade to a larger Render plan:
-
Uncomment in
nuxt.config.ts:'@nuxt/content', 'nuxt-og-image',
-
Increase memory:
NODE_OPTIONS="--max-old-space-size=8192" -
Switch back to node-server preset:
preset: 'node-server'And update start command to:
node .output/server/index.mjs
nuxt.config.ts- Memory optimization, disabled modulesrender.yaml- Updated build/start commands, added env varsserver/api/invoices/[id]/download.get.ts- Fixed import pathapp/components/**/*.vue- Fixed color variantspackage.json- Already had build:render script
Test the build locally:
bun run buildShould output: ✨ Build complete!