Cannot read property 'spritemap': after update to v4.0
See original GitHub issueDescription After update to v4.0 error: Cannot read property ‘spritemap’ of undefined
Expected behavior Build without error
Actual behavior
(node:7608) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'spritemap' of undefined
at SVGSpritemapPlugin.updateFilename (/home/user/works/example/node_modules/svg-spritemap-webpack-plugin/lib/index.js:431:43)
at /home/user/works/example/node_modules/svg-spritemap-webpack-plugin/lib/index.js:221:22
at Hook.eval [as call] (eval at create (/home/user/works/example/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at Hook.CALL_DELEGATE [as _call] (/home/user/works/example/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at /home/user/works/example/node_modules/webpack/lib/Compilation.js:2470:28
at /home/user/works/example/node_modules/webpack/lib/Compilation.js:2670:5
at /home/user/works/example/node_modules/neo-async/async.js:2818:7
at done (/home/user/works/example/node_modules/neo-async/async.js:3522:9)
at /home/user/works/example/node_modules/webpack/lib/Compilation.js:2650:7
at /home/user/works/example/node_modules/webpack/lib/Compilation.js:2738:32
System information
Minimal reproduction
new SVGSpritemapPlugin([
'source/img/svg-sprite/*.svg',
], {
output: {
filename: 'img/svg-sprite.svg',
svg4everybody: false,
svgo: false,
},
sprite: {
prefix: (filename) => {
return 'icon-';
},
generate: {
title: false,
},
},
}),
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:30 (10 by maintainers)
Top Results From Across the Web
Programmatically creating SVG with Phaser 3: Cannot read ...
The problem is because of the atlas data structure. I should have been calling addAtlasJSONHash() instead of addAtlas() .
Read more >Cannot read property 'tap' of undefined · Issue #255 - GitHub
Can't get it running with webpack 4.44.2 [webpack-cli] TypeError: Cannot read property 'tap' of undefined at FaviconsWebpackPlugin.apply ...
Read more >Sage 10 - Bud doesn't start the dev server when using a plugin
When using the 'svg-spritemap-webpack-plugin' plugin on bud, the local ... TypeError: Cannot read properties of undefined (reading 'store').
Read more >Cannot read property 'play' of undefined - Phaser 3
I'm having trouble getting a sprite animation to work. I'm trying to play a sprite animation the same why as in the “creating...
Read more >Spritesheet loading error since update to 5.2.3 - Pixi.js
Howdy, I just updated pixi.js in my project from 5.2.1 to 5.2.4, ... Cannot read property 'baseTexture' of null at new Spritesheet ......
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
Thanks again for the additional information, I’m pretty sure the fix in 7da9664 should resolve the path issue you’re running into.
The division symbol deprecation warning should be gone with the changes in 6296251. It’s a little more complicated than simply upgrading the generated sass file, other processors such as libsass don’t implement
math.div
ye. Luckily the chunking logic that was there for performance reasons back in the day could be removed.In the future, creating a separate issue for something totally unrelated is usually the way to go to keep discussions on track ✌🏼
If you could test both of these by installing directly from GitHub, that’d be great! ❤️
yes i understood! I reduce to the minimal config => https://github.com/Diono/test without any options, i still have the problem