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

bug: yarn install failing on a mac #542

Closed
hkirat opened this issue May 7, 2024 · 7 comments · Fixed by #564
Closed

bug: yarn install failing on a mac #542

hkirat opened this issue May 7, 2024 · 7 comments · Fixed by #564
Labels
bug Something isn't working

Comments

@hkirat
Copy link
Contributor

hkirat commented May 7, 2024

post https://github.com/code100x/cms/pull/487/files
Something with the canvas library

@hkirat hkirat added the bug Something isn't working label May 7, 2024
@hkirat
Copy link
Contributor Author

hkirat commented May 7, 2024

/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]

@hkirat
Copy link
Contributor Author

hkirat commented May 7, 2024

cc @dhruvilmehta

@dhruvilmehta
Copy link
Contributor

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:

  1. https://github.com/Automattic/node-canvas/wiki/Installation%3A-Mac-OS-X
  2. Install error Automattic/node-canvas#1825

@VK-RED
Copy link
Contributor

VK-RED commented May 9, 2024

Failing on Linux as well !

@dhruvilmehta
Copy link
Contributor

Is it still failing after running the above command? It solved the issue for me on Mac.

@VK-RED
Copy link
Contributor

VK-RED commented May 11, 2024

No it did not solve for linux

@Arup20MA20010
Copy link
Contributor

Arup20MA20010 commented May 11, 2024

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants