Skip to content

Commit 9f36094

Browse files
author
apex-ai-net
committed
fix(config): resolve Next.js 15 transpilePackages conflict with serverExternalPackages
- Removed recharts, framer-motion, and motion from serverExternalPackages in next.config.ts - Removed same UI libs from external_node_modules in netlify.toml - These client-only UI libraries were conflicting with Next.js transpilation - Kept server-side packages (OpenAI, Stripe, Sentry, Supabase, etc.) externalized - Build now completes successfully (exit code 0) - Resolves Netlify build error: 'packages in transpilePackages conflict with serverExternalPackages' Validation: ✅ Type check passes (tsc --noEmit) ✅ Lint passes (only warnings, no errors) ✅ Production build succeeds (npm run build) ✅ Static generation: 76/76 pages ✅ First Load JS optimized with proper chunking
1 parent 31a60f4 commit 9f36094

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

netlify.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161

6262
# Externalize large packages - they'll be available at runtime
6363
# but not bundled into the Lambda function
64+
# Note: Only server-side packages should be externalized to avoid conflicts
65+
# with Next.js transpilePackages (client UI libs are bundled normally)
6466
external_node_modules = [
6567
"@sentry/nextjs",
6668
"@sentry/node",
@@ -72,9 +74,6 @@
7274
"@supabase/supabase-js",
7375
"@supabase/auth-helpers-nextjs",
7476
"svix",
75-
"pg",
76-
"recharts",
77-
"framer-motion",
78-
"motion"
77+
"pg"
7978
]
8079

next.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ const nextConfig: NextConfig = {
2323
'@supabase/supabase-js',
2424
'@supabase/auth-helpers-nextjs',
2525
'pg',
26-
// Large UI/Animation libraries
27-
'recharts',
28-
'framer-motion',
29-
'motion',
26+
// UI/Animation libraries removed - they conflict with transpilePackages in Next.js 15
27+
// Removed: 'recharts', 'framer-motion', 'motion'
3028
],
3129
outputFileTracingRoot: path.join(__dirname),
3230
// Expose Sentry DSN to the client without adding new Netlify vars

0 commit comments

Comments
 (0)