Error: Cannot read property 'type' of undefined
See original GitHub issueHello, I use “extract-svg-sprite-webpack-plugin” as described in the example and get the following error:
(node:10720) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'type' of undefined
at Function.replaceInModuleSource (/home/user/Embedded/7490/HTML_vr9_build/node_modules/extract-svg-sprite-webpack-plugin/lib/utils/replacer.js:62:16)
at s.cssModules.forEach.m (/home/user/Embedded/7490/HTML_vr9_build/node_modules/extract-svg-sprite-webpack-plugin/lib/plugin.js:66:32)
at Array.forEach (<anonymous>)
at sprite.symbols.forEach.s (/home/user/Embedded/7490/HTML_vr9_build/node_modules/extract-svg-sprite-webpack-plugin/lib/plugin.js:65:34)
at Array.forEach (<anonymous>)
at result.forEach (/home/user/Embedded/7490/HTML_vr9_build/node_modules/extract-svg-sprite-webpack-plugin/lib/plugin.js:63:32)
at Array.forEach (<anonymous>)
at compileSprites.then.result (/home/user/Embedded/7490/HTML_vr9_build/node_modules/extract-svg-sprite-webpack-plugin/lib/plugin.js:62:22)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
In cssModules of symbols are undefined values (line: 65):
s.cssModules.forEach(m => {
I use the following webpack plugins:
- VueLoaderPlugin
- MiniCssExtractPlugin
- HtmlWebpackPlugin
and loader for css:
- MiniCssExtractPlugin.loader
- css-loader
- SpritePlugin.cssLoader
- postcss-loader
- sass-loader
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'type' of undefined ...
Your clicking action returns a function and you are dispatching that function with this.props.dispatch(clicking(isClicking)); .
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >TypeError: Cannot read property 'type' of undefined at Object ...
Current Behavior On some computers of my team, people are having this error : (node:10932) UnhandledPromiseRejectionWarning: TypeError: ...
Read more >How to Avoid the Infamous "Cannot read properties of ... - Bitovi
Interpreting undefined or null as subtypes of all other types can lead to runtime problems. For example, if you try to get the...
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
May be it will be helpful. I am using dynamic imports, mini-css-extract-plguin, sass, html webpack plugin
I have the same problem without css modules