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

v2.11.2/canvas-v2.11.2-node-v120-darwin-unknown-arm64.tar.gz was not found for my mac m1 #2351

Open
ghulamrasuldev opened this issue Feb 16, 2024 · 9 comments

Comments

@ghulamrasuldev
Copy link

Use M1 Mac and try installing library: chartjs-node-canvas.
It also depends on your library, which gives the following error:

node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v120-darwin-unknown-arm64.tar.gz

That means build for canvas library for arm64 is missing.

@minega25
Copy link

facing similar issue

@coderfin
Copy link

I'm not associated with this project or https://github.com/Brooooooklyn/canvas but I found that https://www.npmjs.com/package/@napi-rs/canvas is a great replacement for node-canvas. @napi-rs/canvas supports Intel and Arm (M Chip) Macs with no system dependencies. It supports all the same features that I needed. It also supports webp which was a welcome bonus and is MIT license.

Instead of registerFont use GlobalFonts.registerFromPath; createCanvas and loadImage remain the same.

@fhigher
Copy link

fhigher commented Mar 2, 2024

facing similar issue

@adeelibr
Copy link

this issue is still valid

@mn4367
Copy link

mn4367 commented Mar 19, 2024

Maybe this and the following comment helps.

@adeelibr
Copy link

I shared the solution here #1511 (comment) for apple m1 chip

@mn4367
Copy link

mn4367 commented Mar 19, 2024

Just for the record, I didn't install node-gyp nor did I export CXXFLAGS. Having installed Xcode, brew and the dependencies mentioned in the README should be sufficient for installing canvas on Node 20 (as I mentioned, installing on Node 21 didn't work).

Can you can confirm that your procedure works on Node 21?

@adeelibr
Copy link

I can confirm the solution worked for me on Node version 20

@mn4367
Copy link

mn4367 commented Mar 19, 2024

So not on Node 21?

domoritz added a commit to vega/vega-lite that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants