Skip to content

NodeJS Canvas is not a constructor  #232

@safoine27

Description

@safoine27

I tried running the example of NodeJS but it kept giving me this error

const Caman = require('caman').Caman;

Caman("user-icon.jpg", function () {
  this.brightness(40);
  this.render(function () {
    this.save("./output.png");
  });
});

and it gave me this error

_this.canvas = new Canvas(img.width, img.height);
^

TypeError: Canvas is not a constructor

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