Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix node-canvas source compile for node >= v21 (#4122)
The maplibre-gl-js install currently fails on arm64 macs when running Node >= 21. The error is: ``` ../../nan/nan.h:2546:8: error: no matching member function for call to 'SetAccessor' tpl->SetAccessor( ``` The context is that `maplibre-gl-js` depends on `node-canvas@2.x` which has a dependency on the `nan` package and `nan` 2.17 had a bug that surfaced with node v21: nodejs/nan#966. Additionally `node-canvas` does not currently provide pre-compiled binaries for Arm64, so a source compile is needed. So, the solution here is to upgrade the `nan` version to the latest release which fixes support with recent node.
- Loading branch information