"Loading the component for ${page.path} failed" after new build deployed
See original GitHub issueI’ve noticed the following scenario can happen:
- Build & deploy gatsby site to S3 via sync (missing files get deleted from bucket)
- Load site in browser
- Edit some /page/name.js
- Repeat step (1)
- 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:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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! 👍