[Bug] Prefetching issues (Cannot read property `templateLoaded` of undefined)
See original GitHub issueReporting a bug?
Hey!
I’ve been running into an issue where I’ve been receiving this error when navigating between pages on when running a dev server:

Any thoughts on the instances in which this could even occur? Or should we be guarding against routeInfo
being undefined?
I’ve currently been in the process of migrating from v5 to v6.
Environment
System:
OS: macOS 10.14
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 2.96 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.9.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
Browsers:
Chrome: 71.0.3578.98
Firefox: 63.0.3
Safari: 12.0
of course include any other package versions here if relevant.
Steps to Reproduce the problem
Base your steps off of any freshly installed react-static template!
- Navigate between pages
- BOOM!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Shared data is not available when using the `withRouteData` · Issue ...
Are you reporting a bug? Yes. Shared data is not available in the props when using the withRouteData HOC in the build. While...
Read more >core.js:6014 ERROR TypeError: Cannot read property ...
I have a table that combines dynamic data as well as form elements that I want to be combined in Form group. Any...
Read more >Cannot read property 'template' of undefined - Syncfusion
and when te page is rendered I received this error: ERROR TypeError: Cannot read property 'template' of undefined. at template.js:25.
Read more >IBM Tivoli Monitoring: Messages
Message logging refers to the text and numeric messages created by Tivoli. Management Services components and IBM Tivoli OMEGAMON® monitoring agents.
Read more >Cannot read properties of undefined' - JavaScript Debugging
Join Discord https://selftaught-dev.com/join-discord//r/SelfTaughtDev - https://www.reddit.com/r/selftaughtdevGet My Resume Template Free ...
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
Oops… @krzysztof-pyrzyk-ah I see we were working on the same issue! The fix I just submitted as PR is the same as yours, but I realised the underlying issue here is that 404 route info is not handled correctly in all cases after #992 was merged. This is quite a complex issue though so I hope @tannerlinsley you could also have a look at this!
@jlee1201 Does this error break the page? In development it should be expected for your site to at least try fetching the routeInfo and templates for valid links (even if they point to nonexistent pages).