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

Troubles installing canvas on a Macbook M1 #43

Open
iliashchuk opened this issue Jun 19, 2024 · 1 comment
Open

Troubles installing canvas on a Macbook M1 #43

iliashchuk opened this issue Jun 19, 2024 · 1 comment
Assignees

Comments

@iliashchuk
Copy link

iliashchuk commented Jun 19, 2024

Whatever I do, I run into an error where canvas in not able to be fetched:

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/nodecanvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-darwin-unknown-arm64.tar.gz

I followed the official instructuion to install via Hombrew and manualy, used npm and yarn, --force flags, cleared node-modules and cache, etc.

Unfortunatelly, nothing helps. Somehow, app still runs most of the time, even displays the online map, it's possible to move tokens etc, but on reload it fails with Cannot find module '../build/Release/canvas.node'.

Of course, no installation command (yarn or npm i) can complete because of the node-canvas not found error.

@JollyGrin
Copy link
Owner

Shoot! @iliashchuk Let's see if we can troubleshoot this.

I'm also using an M1 mac,
So you're saying that yarn add canvas did not work?

Canvas has given me trouble in the past, but I've never had the issue of it working and then stop working on reload.

Could you try with pnpm? That's what I've been using recently, here's a screenshot inside my node_modules
image

Here's a zip of the contained canvas folder (rename it to just canvas) if it's of any use. It's symlinked from my pnpm folder
canvas-2.11.2.zip

@JollyGrin JollyGrin self-assigned this Jul 11, 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

2 participants