-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Issue or Feature
- If this is an issue with installation, I have read the troubleshooting guide.
I have done: brew install pkg-config cairo pango libpng jpeg giflib librsvg
And I have tried many, many other ways to get around this (some of which are listed here)
But I still cannot install canvas on Apple silicon. Failure is:
In file included from /Users/emoyse/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:12:
/Users/emoyse/Library/Caches/node-gyp/21.7.1/include/node/v8-local-handle.h:253:5: error: static assertion failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value': type check
static_assert(std::is_base_of<T, S>::value, "type check");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Data>' requested here
cbinfo(info, obj->GetInternalField(kDataIndex));
^
N.B. we don't actually have a direct dependency on canvas from phoenix, but get it from a package we use jsroot.
emoyse@macminim1umass phoenix % yarn why canvas
└─ jsroot@npm:7.6.0
└─ canvas@npm:2.11.2 (via npm:^2.11.2)
Steps to Reproduce
git clone https://github.com/HSF/phoenix.git
cd phoenix
yarn install
This will fail with:
➤ YN0009: │ canvas@npm:2.11.2 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/j6/cv3xx2910nx_pg7v2t8czqzc0000gn/T/xfs-bf1ea463/build.log)
(build.log is attached)
What is weird is checking out node-canvas and doing yarn install there seems to work... the only obvious difference I see in the log files is node-gyp version:
< gyp info using [email protected]
---
> gyp info using [email protected]
Your Environment
- yarn --version : 3.3.1
- Version of node-canvas: v2.11.2
- Environment: node 21.7.1 on macOS 14.3.1, Apple M1