Skip to content

[#922] Fix Vercel deploy: change OG route from Edge to Node.js runtime#923

Merged
realproject7 merged 1 commit intomainfrom
task/922-fix-edge-og-runtime
Apr 21, 2026
Merged

[#922] Fix Vercel deploy: change OG route from Edge to Node.js runtime#923
realproject7 merged 1 commit intomainfrom
task/922-fix-edge-og-runtime

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Changed export const runtime = "edge" to "nodejs" in src/app/story/[storylineId]/og/route.tsx
  • All Vercel deployments have been failing since Apr 15 (PR [#876] Fix Market Cap blank box during price loading #896) because the Edge bundler includes mint.club-v2-sdk which is unsupported in the Edge runtime
  • OG image generation doesn't benefit from Edge — Node.js runtime is fine

Root Cause

PR #896 refactored lib/usd-price.ts:

  1. Added import { createServiceRoleClient } from "./supabase" (DB fallback)
  2. Restructured Mint Club SDK import into a fetchFromMintClub() function called via Promise.any()

The OG route imports getPlotUsdPrice from usd-price.ts. The Edge bundler (Turbopack) can no longer tree-shake the mint.club-v2-sdk dynamic import through the new function indirection, so it bundles it — and Vercel rejects it.

Test plan

  • npm run typecheck passes
  • npm run lint passes (0 errors)
  • No other Edge routes exist (grep confirmed)
  • Vercel deploy succeeds after merge
  • OG images still render correctly (/story/[id]/og)

Fixes #922

🤖 Generated with Claude Code

PR #896 refactored lib/usd-price.ts to use Promise.any() for parallel
price fetching and added a DB fallback import. This caused the Edge
bundler (Turbopack) to include mint.club-v2-sdk in the Edge bundle,
which Vercel rejects as an unsupported module.

The OG image route doesn't need Edge runtime — switching to Node.js
resolves the deploy failure that has blocked all deployments since Apr 15.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 21, 2026 10:14am

Request Review

@realproject7 realproject7 merged commit f9e5345 into main Apr 21, 2026
4 checks passed
@realproject7 realproject7 deleted the task/922-fix-edge-og-runtime branch April 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hotfix] Vercel deploy fails: Edge Function OG route imports mint.club-v2-sdk

1 participant