bug: yarn install failing on a mac
post https://github.com/code100x/cms/pull/487/files Something with the canvas library
/Users/harkiratsingh/Projects/cms/node_modules/canvas: Command failed. Exit code: 1 Command: node-pre-gyp install --fallback-to-build --update-binary Arguments: Directory: /Users/harkiratsingh/Projects/cms/node_modules/canvas Output: node-pre-gyp info it worked if it ends with ok node-pre-gyp info using [email protected]
cc @dhruvilmehta
For Apple silicon chips, you need to run brew install pkg-config cairo pango libpng jpeg giflib librsvg. I tried this and it started running.
Source:
- https://github.com/Automattic/node-canvas/wiki/Installation%3A-Mac-OS-X
- https://github.com/Automattic/node-canvas/issues/1825
Failing on Linux as well !
Is it still failing after running the above command? It solved the issue for me on Mac.
No it did not solve for linux
Canvas library is dependent on other packages that are not natively available on Linux machines and node-alpine images. So you need to install the dependencies in the machine before running npm install. Refer to this link: link . I have fixed the same in the Dockerfile and raised a PR #564 .