Skip to content

Canvas fails to import after install #2380

@sojs-coder

Description

@sojs-coder

Issue or Feature

Node canvas fails to run, none of the issues listed in the troubleshooting guide helped me at all.

A simple require statement throws the error.

Steps to Reproduce

var Canvas = require('canvas');

One line... that is all.

Installed with

npm i canvas

Did not build, everything seemed to install fine, no errors.

Here is what happens when I run the code....
image

Your Environment

  • Version of node-canvas:
    image

  • Environment: node v20.11.1, Linux 22.04.1-Ubuntu x86_64 GNU/Linux, running in a REPL on repl.it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions