cuginoAle / svg-inliner

CLI to export SVG icons
8 stars 1 forks source link

SVGO 1.3.1 breaks svg-inliner #1

Open ashbrener opened 4 years ago

ashbrener commented 4 years ago

svgo@1.3.0 is fine, however svgo@1.3.1 breaks:

npx @cuginoale/svg-inliner

--------------------------------------------
╔═╗┬  ┬┌─┐  ╦┌┐┌┬  ┬┌┐┌┌─┐┬─┐
╚═╗└┐┌┘│ ┬  ║││││  ││││├┤ ├┬┘
╚═╝ └┘ └─┘  ╩┘└┘┴─┘┴┘└┘└─┘┴└─    ver. 0.1.8
--------------------------------------------

Smile | Frown | (node:26389) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'multipassCount' of undefined
    at optimizeOnceCallback (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo.js:41:37)
    at /Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo.js:71:9
    at SAXParser.sax.onend (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo/svg2js.js:169:13)
    at emit (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/sax/lib/sax.js:624:35)
    at end (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/sax/lib/sax.js:667:5)
    at SAXParser.write (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/sax/lib/sax.js:975:14)
    at SAXParser.close (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/sax/lib/sax.js:157:38)
    at module.exports (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo/svg2js.js:182:28)
    at SVGO._optimizeOnce (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo.js:63:5)
    at Promise (/Users/AB/.npm/_npx/26389/lib/node_modules/@cuginoale/svg-inliner/node_modules/svgo/lib/svgo.js:56:14)
(node:26389) 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: 3)
(node:26389) [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.
theredwillow commented 3 years ago

This repo is very far behind now. There are bugs that have been fixed in later versions of svgo. https://github.com/svg/svgo/issues/1264