neocotic / convert-svg

Node.js packages for converting SVG into other formats using headless Chromium
MIT License
200 stars 47 forks source link

Support macOS with M1 #74

Closed fulldecent closed 2 years ago

fulldecent commented 2 years ago

Running this on a M1 Mac produces:

❯ npm exec convert-svg-to-png file.svg convert-svg-to-png failed: Error: spawn Unknown system error -86 at ChildProcess.spawn (node:internal/child_process:413:11) at Object.spawn (node:child_process:700:9) at Launcher.launch (/Users/user/Desktop/tmp/node_modules/puppeteer/lib/Launcher.js:132:40) at async Converter.[getPage] (/Users/user/Desktop/tmp/node_modules/convert-svg-core/src/Converter.js:273:24) at async Converter.[convert] (/Users/user/Desktop/tmp/node_modules/convert-svg-core/src/Converter.js:205:18) at async Converter.convertFile (/Users/user/Desktop/tmp/node_modules/convert-svg-core/src/Converter.js:148:20) at async CLI.[convertFiles] (/Users/user/Desktop/tmp/node_modules/convert-svg-core/src/CLI.js:198:30) at async CLI.parse (/Users/user/Desktop/tmp/node_modules/convert-svg-core/src/CLI.js:172:9) at async /Users/user/Desktop/tmp/node_modules/convert-svg-to-png/bin/convert-svg-to-png:35:5

yisibl commented 2 years ago

You can try resvg-js, which supports Apple M1

neocotic commented 2 years ago

I'm sorry for the delay in replying in responding to you but life sometimes gets in the way of OSS development. I thank you for your patience and, although I'm closing this issue out, I hope you'll be glad to know that I believe this issue has been resolved in with today's 0.6.0 release with a bump in Puppeteer to the latest version. I believe ^10 was needed for M1 support and we're now on ^13.7.

If you continue to have this problem, please raise a new ticket with an SVG to reproduce the problem and, where possible, an expected and actual file of the output. I hope you can understand my delay.

fulldecent commented 2 years ago

Excellent, thank you!