Skip to content

Vega.Export.save!() function generates invalid images for PNG and SVG #76

@zgcarvalho

Description

@zgcarvalho

Hello,
I have encountered an issue when using the Vega.Export.save!() functions in Elixir Vega Lite. When generating images, both PNG and SVG types are coming out as invalid while the PDF type works as expected.
For reference, I have installed all the required npm packages globally:

$ npm install -g vega vega-lite canvas

When attempting to generate an SVG image with Vega.Export.to_svg(), the output starts with a deprecation warning:

(node:13698) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node21 --trace-deprecation ...` to show where the warning was created)

Once these first two lines (containing the deprecation warning) are manually removed from the SVG file, it works as intended.
Any assistance or guidance on how to resolve this issue would be much appreciated. Thank you in advance for your time and help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions