Next.js Discord

Discord Forum

NextJS/Netlify/Supabase -ChunkLoadError: Loading chunk 702 failed

Unanswered
Chausie posted this in #help-forum
Open in Discord
ChausieOP
Hey Guys! I could really use some help or fresh eyes on an issue I've been stuck on for days.

I keep getting this error and I'm completely out of ideas on how to fix it:
ChunkLoadError: Loading chunk 702 failed

What I have tried so far:

Modals and dynamic imports ❌
UpgradeModal modal with normal import
DynamicUpgradeModal with next/dynamic and loading state
ssr: false for client-only
Result: Systematic ChunkLoadError


Server approaches ❌
Netlify Function check-profile-limit.mts
Separation of supabase-server.ts / supabase client
Next.js API route for checking limits
Result: ChunkLoadError as soon as the client was touched


Native alerts ❌
Native JavaScript alert() (zero React, zero chunks)
Result: Even the native alert caused a ChunkLoadError!


Inline components ❌
PlanLimitMessage.tsx (simple component without a modal)
Inline display in the dashboard
Result: ChunkLoadError as well


Messages in existing modal ❌
Simple error message in setScanProgress
No new component
Result: ChunkLoadError again!


Netlify Configuration
✅ Node 18 → 20 upgrade (Supabase compatibility)
❌ Removal of the /.netlify/functions/* redirect
❓ /* → /index.html redirect still present (main suspect)

0 Replies