TypeError: Cannot read property 'length' of null
See original GitHub issueUsing webpack 2 beta 6.
Trace:
chunk main [entry]
3-12ccc3f32505ae5e2d7e.js
Cannot read property 'length' of null
TypeError: Cannot read property 'length' of null
at /Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/ContextModule.js:139:25
at Array.forEach (native)
at Module.ContextModule.source (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/ContextModule.js:137:6)
at Template.ModuleTemplate.render (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/ModuleTemplate.js:14:28)
at Template.renderChunkModules (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/Template.js:115:31)
at Template.<anonymous> (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/MainTemplate.js:36:22)
at Template.applyPluginsWaterfall (/Users/mmahalwy/Sites/sparrow/node_modules/tapable/lib/Tapable.js:34:24)
at Template.MainTemplate.render (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/MainTemplate.js:129:20)
at Compilation.createChunkAssets (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/Compilation.js:845:33)
at Compilation.<anonymous> (/Users/mmahalwy/Sites/sparrow/node_modules/webpack/lib/Compilation.js:556:9)
Relevant code:
const loadContainerAsync = route => (location, cb) => {
console.log(location, cb);
// require.ensure([], (require) => {
// cb(null, require('./containers/' + route + '/index.js'));
// });
// console.log(location);
return System.import(`./containers/${route}/index.js`).then(module => cb(null, module)).catch(err => console.log(err));
};
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
[Solved] TypeError: Cannot read property 'length' of null
This error indicates that the code is trying to compute the length property on a null variable. A null variable holds no or...
Read more >Cannot read property 'length' of null (javascript) - Stack Overflow
From the code that you have provided, not knowing the language that you are programming in. The variable capital is null. When you...
Read more >Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >Uncaught TypeError: Cannot read property 'length' of null error
Hello, I am getting the error “Uncaught TypeError: Cannot read property 'length' of null” in the console and cannot figure out why this...
Read more >TypeError : Cannot read property "length" from null
The cause of this issue is due to Payload size which is more than 5mb in the rest call. ... "Plain text processor,...
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
Have you tried
@valerybugakov correct, with a variable. Like this: