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.

BUG: Uncaught (in promise) Error: Loading chunk 0 failed.

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

I’m exporting using the amd libraryTarget. The sources use dynamic imports and my webpack.config.js has multiple entries.

Loading the output entry file works fine, but the file itself loads the fileA.js file, resulting in this error: Uncaught (in promise) Error: Loading chunk 0 failed.

If the current behavior is a bug, please provide the steps to reproduce.

Here is a repo I created which shows the problem: https://github.com/johannes-z/webpack-test

What is the expected behavior?

The url of the script.src is correct (I double checked, opening the file in my browser and it was found).

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

node: v7.7.0 webpack: v3.1.0

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
antn9xcommented, Apr 4, 2018

I resolved by add publicPath: '/', to output in webpack, hope this help.

5reactions
victorhugorchcommented, Jun 11, 2018

This error maybe can occur because you forgotten or cancel run ionic lab on terminal and try to access any page. Give a look on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught (in promise) Error: Loading chunk # failed. #7502
This happens if a chunk could not be loaded, which will happen more often on mobile due to poor connections. You need to...
Read more >
How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >
Lazy loading issue : Loading chunk 0 failed - Stack Overflow
Clean Your Cache or use CTRL + Shift + R combo key and try again!
Read more >
Loading chunk failed vue
Uncaught (in promise chunkloaderror Loading chunk 0 failed Angular). Angular is running in the development mode. Call enableProdMode() to enable the production ...
Read more >
React + Webpack: ChunkLoadError: Loading chunk X failed.
You get this error when React attempts to lazy load a file — eg. a component — but the file does not exist....
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