Uncaught TypeError: Cannot read property 'Symbol(loadable)' of undefined
See original GitHub issueProblem occurs while I work with server render and dynamic client code from webpack. Seems I have difference in module numbers when HMR recompile my client code. Server rendering works throw babel-node and don’t need webpack build.
/* eslint-env browser */
function loadComponents() {
if (typeof window === 'undefined') {
throw new Error('`loadComponents` must be called client-side: `window` is undefined');
}
var ids = window[_constants.COMPONENT_IDS] || [];
return Promise.all(ids.map(function (id) {
return componentTracker.get(id)[_constants.LOADABLE]().load(); // error here
}));
}
HTML contains IDS
<script>window.__LOADABLE_COMPONENT_IDS__ = [6553];</script>
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (12 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'Symbol(loadable ...
Problem occurs while I work with server render and dynamic client code from webpack. Seems I have difference in module numbers when HMR ......
Read more >Cannot read property loadChart of undefined - Stack Overflow
This error occurs on the "item.load(data)" line. I've put a setTimeOut to delay the load, and it resolved for me like this: setTimeout ......
Read more >Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >cannot read properties of undefined (reading 'icon') - You.com
Here the error is coming from line 2: value: {Icon, name, level} . The value coming via props seems to be undefined. Check...
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 FreeTop 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
Top GitHub Comments
A disclamer about this in
README.md
could save some time and headachesThis long issue is now solved in v1. I close this issue because it was relative to the previous version. Feel free to open an issue if you experience any problem with the new fresh v1 of loadable-components.