Turbopack throwing Failed to load chunk /_next/static/chunks/xxx.js from module yyy in production #82651
livingforjesus
started this conversation in
Turbopack Error Report
Replies: 3 comments 2 replies
-
I can confirm we are also seeing this in sentry/posthog, in some cases it fully crashes the client. |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We've been getting a lot of sentry errors saying Failed to load chunk from module xxx in production. We're building the app with turbopack build. These errors dont block the ui. They are only console errors. They seem to only come during prefetching of the next page(nextjs automatically prefetching links on the page) and never come on current page(at least I haven't noticed them there). I haven't been able to reproduce locally personally on our project so I can't create a reproduction.
Furthermore, when I look at our vercel logs, the chunks that threw error seem to be actually successfully requested by the user. Tried to look at turbopack source and It looks like that error would only be thrown if script.onerror gets invoked which makes no sense since the request for the chunk seemed to be successful. Also the error is intermittent and I personally haven't been able to repro myself but we do get several errors per day about this and it is reported/captured in sentry and posthog
This issue isn't really turbopack specific. We recently switched from webpack build to turbopack build. Before the switch we were facing issues like TypeError: can't access property "call", e[a] is undefined. This felt like a more cryptic error message but suggests that webpack was unable to find a module/chunk that should've been there. It also happened during prefetching of chunks related to other routes. This error keeps creating new issues in sentry since the chunk names, etc are different
I was wondering if we should ignore this error in sentry since it doesn't cause the ui to break or if there's something else to do to fix it. Or maybe I should provide more info?
One example of the error in posthog

Actual request to get the chunk for the example

Beta Was this translation helpful? Give feedback.
All reactions