Closed jindrazak closed 4 years ago
I have the same issue. Works with 0.3.2, stopped working with 0.4.0.
The problem is here: https://github.com/shakiba/svgexport/blob/master/render.js#L30
On Windows, svgfile
will be something like C:\users\....
, so the URL that gets created is file://C:\users\...
, but it should be file:///C:/users/
(three forward slashes, backslashes replaced by forward slashes although I'm not certain the latter is needed).
Yes, I have already prepared a fix for Windows. There is still another Windows bug to be fixed, once this is done we can release a new version.
@MichaelHeerklotz , any chance to make the latest version work on Windows soon? :)
@roman-petrov I am aiming for a release this week. Sorry for taking so long.
@MichaelHeerklotz , sounds great! Thank you!
I have the same problem where can I find the latest version
For Windows users, in %AppData%\npm\node_modules\svgexport\render.js
Change the line
await page.goto('file://' + encodeURI(svgfile))
into
await page.goto('file:///' + encodeURI(svgfile).replace(new RegExp(/%5C/g),"/"))
@ctch3ng Wouldn't it be better to apply a pull request?
Submitted #83. Resolved issues on Windows for me. Haven't tested on other systems.
Alternative PR: https://github.com/shakiba/svgexport/pull/86
I am facing trouble exporting svg to png on Windows.
Way to reproduce:
Powershell: