Skip to content

Commit 44ee5e2

Browse files
devakoneclaude
andcommitted
fix: use next/og instead of @vercel/og for ImageResponse
The @vercel/og module was failing to bundle correctly on Vercel's Node.js runtime with error "Cannot find module index.node.js". Using Next.js's built-in ImageResponse from next/og resolves this issue. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 05bbb67 commit 44ee5e2

7 files changed

Lines changed: 8 additions & 6 deletions

File tree

apps/web/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vercel
2+
.env*.local

apps/web/src/app/api/og/analysis/[jobId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createSupabaseServerClient } from "@/lib/supabase/server";
33
import { computeShareCardMetrics } from "@/lib/vcp/metrics";
44
import { isVibeAxes } from "@/lib/vcp/validators";

apps/web/src/app/api/og/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22

33
export const runtime = "edge";
44

apps/web/src/app/api/og/u/[username]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createClient } from "@supabase/supabase-js";
33
import { getPersonaAura } from "@/lib/persona-auras";
44

apps/web/src/app/api/share-debug/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22

33
export const runtime = "nodejs";
44

apps/web/src/app/api/share/[format]/[userId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import { createClient } from "@supabase/supabase-js";
33
import { getPersonaAura } from "@/lib/persona-auras";
44

apps/web/src/app/api/share/story/[userId]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ImageResponse } from "@vercel/og";
1+
import { ImageResponse } from "next/og";
22
import QRCode from "qrcode";
33
import { createSupabaseServerClient } from "@/lib/supabase/server";
44
import { computeShareCardMetrics } from "@/lib/vcp/metrics";

0 commit comments

Comments
 (0)