Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas fails to import after install #2380

Closed
sojs-coder opened this issue May 7, 2024 · 3 comments
Closed

Canvas fails to import after install #2380

sojs-coder opened this issue May 7, 2024 · 3 comments

Comments

@sojs-coder
Copy link

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

@namnguyenthanhwork
Copy link

Are you install on mac?

@sojs-coder
Copy link
Author

no, this is on ubuntu @namnguyenthanhwork

@zbjornson
Copy link
Collaborator

I had to install libuuid (System Dependencies > search for "util-linux" and install "libuuid@2.38.1"), but then npm install canvas@next to install v3.0.0-rc2 worked on repl.it.


I'm trying to close out as many of the dozens of installation issues as possible. If the above doesn't work and I miss a ping here to reopen this issue, please don't hesitate to open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants