svg-sprite: Latest version of SVGO 1.1.0 breaks svg-sprite
svgo just released 1.1.0 on npm which seems to break svg-sprite.
It seems to have broken a lot of other third-party tools as well, I believe this is related https://github.com/svg/svgo/issues/1030
(node:9800) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'distribute' of undefined
at SVGSpriterQueue.remove (C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\lib\svg-sprite\queue.js:97:58)
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:473:16
at next (C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:5329:29)
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:969:16
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\lib\svg-sprite.js:200:9
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:473:16
at next (C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:5329:29)
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\node_modules\async\dist\async.js:969:16
at C:\Users\longz\AppData\Roaming\npm\node_modules\svg-sprite\lib\svg-sprite\transform\svgo.js:92:3
at <anonymous>
(node:9800) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9800) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15
Commits related to this issue
- Fix and update cleanupListOfValues tests — committed to svg/svgo by GreLI 6 years ago
- Update dependencies (#276) — committed to svg-sprite/svg-sprite by jkphl 6 years ago
@jonnitto Awesome, thank you! Will do as soon as I find some minutes.
I just pushed out the release
1.4.1with only minimal dependency updates which should fix the SVGO issue. Gulp & Grunt versions will follow shortly. It turned out that updating all dependencies caused a separate problem (which looked very similar though) — I’ll do that along with a1.5.0release (as I’ll have to drop support for Node.js < 6.4 then as well). Thanks for all your help!It is fixed with this version: https://github.com/svg/svgo/releases/tag/v1.1.1 svg-sprite should raise the dependency to ^1.1.1