Skip to content

nodejs+svg not working without canvas including #304

@vdenisenko-waverley

Description

@vdenisenko-waverley

Might be mistake in docs which is confusing, but below example is not working on nodejs

// For svg type
const qrCodeSvg = new QRCodeStyling({
    jsdom: JSDOM, // this is required
    type: "svg",
    ...options
});

qrCodeSvg.getRawData("svg").then((buffer) => {
  fs.writeFileSync("test.svg", buffer);
});

In this case getRawData is hanging with no any errors. Only works when including canvas dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions