question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Loading chunk 0 failed

See original GitHub issue

Bug report

Describe the bug

I am suddenly getting the runtime issue:

Unhandled Runtime Error
ChunkLoadError: Loading chunk 0 failed.

The issue popped up first on a project that i was revisiting for a client to make a couple of tweaks on. I’ve also stripped the project on another branch down to essentially a “hello world” and am still getting the issue

To Reproduce

yarn add next@next or next@9.5

Expected behavior

Nextjs to work as normal

Screenshots

Screen Shot 2020-10-01 at 10 29 31 AM

System information

  • OS: macOS
  • Browser Chrome
  • Version of Next.js: 9.5
  • Version of Node.js: 14.13.0

Additional context

The problem started on a project I am working on pretty much out of nowhere – I haven’t added or removed or changed the project at all. I have experienced the issue on three other projects and have to dismiss the issue every time I reload.

I am using typescript

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

36reactions
mihabencommented, Jan 1, 2021

I had this error after removing files from the /public folder.

How I fix it:

1- Remove your /.next folder 2- Launch your project again 3- Force refresh in you browser to delete the cache

2reactions
omarabidcommented, May 11, 2021

I had this error after removing files from the /public folder.

How I fix it:

1- Remove your /.next folder 2- Launch your project again 3- Force refresh in you browser to delete the cache

This fixed it for me. I’m not sure why this issue is closed. It seems to randomly affect certain setups.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Loading chunk 0 failed. - webpack tries to load 0.js
I have figured out a fix, I hope it helps. For my React Routes, I'm using dynamic loading with import statements, without the...
Read more >
Uncaught Error: Loading chunk 0 failed. · Issue #9207 - GitHub
I am unable to share the codebase but the chunk in question is created like so: const PrototypeViewer = lazy(() => import ...
Read more >
React — Loading Chunk Failed Error | by Tushar Mohan
One way that we can fix this error is by using ErrorBoundaries ( Fiber ❤️). But that does not solve our problem. It...
Read more >
Chunks in the wrong folder - Laracasts
app.js:97 GET http://project.dev:8000/users/0.js Error: Loading chunk 0 failed. at HTMLScriptElement.onScriptComplete (app.js:87) app.js:87 Uncaught (in ...
Read more >
Error: Loading chunk 12 failed - Kibana - Elastic Discuss
Version: 7.16.3 Build: 46336 Error: Loading chunk 12 failed. ... ://168.138.163.160:5601/46336/bundles/plugin/infra/8.0.0/infra.chunk.12.js) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found