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 the component for ${page.path} failed" after new build deployed

See original GitHub issue

I’ve noticed the following scenario can happen:

  1. Build & deploy gatsby site to S3 via sync (missing files get deleted from bucket)
  2. Load site in browser
  3. Edit some /page/name.js
  4. Repeat step (1)
  5. With same browser session from (2), navigating to the edited page via a link can fail, with the error in the console: Loading the component for /page-3/ failed from loader.js

Intuitively, I understand why this is happening - the new build has changed the resource for the edited page so the previous one is removed from the server upon sync.

Is it be possible for the loader to handle this scenario? Possibly by attempting a regular ol’ http request of the path, causing the app to reload and refresh the pre-cached references?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
KyleAMathewscommented, Nov 17, 2017

Sweet!

I just meant that within loader track failures. If some downloads are succeeding while some are not, this means the user is definitely online just that they’re fetching older versions of the site some which no longer exist so you should refresh.

0reactions
Chuloocommented, Aug 29, 2018

There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues as many of them have already been resolved with the latest updates or explained in a previous issue.

Feel free to open a new one if you still experience this problem or a similar one! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Code splitting causes chunks to fail to load after new ...
We have an AsyncComponent that we created to load chunks (i.e. route components). When this component loads a chunk and receives and error, ......
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >
How to fix the Whitescreen After a Static Deployment with ...
Loading failed for the <script> with source …​​ In my case, I put them into a sub-directory react-app, so the correct URL is...
Read more >
How to Solve the Chunk Load Error in JavaScript - Rollbar
If you are encountering this error as a user of an application, the most simple way to resolve it is to clear your...
Read more >
Route - Angular
An object specifying a lazy-loaded component. redirectTo?: string. A URL to redirect to when the path matches. Absolute if the URL begins with...
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