JollyGrin / unbrewed-p2p

Refactoring unbrewed with next 13 & typescript
https://jollygrin.github.io/unbrewed-p2p/
3 stars 1 forks source link

Troubles installing canvas on a Macbook M1 #43

Open iliashchuk opened 4 months ago

iliashchuk commented 4 months ago

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 commented 4 months ago

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