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

SYS-1315: Fix npm install problem on Mac M1 #26

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

akohler
Copy link
Member

@akohler akohler commented Jun 16, 2023

This hopefully fixes a problem which occurs when building this Docker image on Mac M1 machines. They need npm packages built for arm64 architecture... and node-canvas apparently has stopped doing that.

The Ex Libris node environment which gets built into this Docker image doesn't explicitly require canvas, but something tries to pull it in, and the missing arm64 packages cause that npm install to fail.

Per various issues, installing some extra OS-level packages may help. This PR adds cairo and pango, which should allow canvas to get built from source by npm install.

This doesn't break anything on my end... I tried building for MacOS via Github Actions, but the docker buildx actions wouldn't run on that OS :( - and the GA environment apparently does not yet support M1 runners anyhow.

So, to test:

git pull
git checkout SYS-1315/fix_mac_canvas
docker-compose down
docker-compose build

Watch output carefully for errors other than the many deprecation warnings, and let me know the outcome.

@akohler akohler requested review from kjallen and ztucker4 June 16, 2023 04:10
Copy link
Contributor

@ztucker4 ztucker4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kristian and I have tested this and it works - we're seeing successful builds on our Macs. Merging, thanks!

@ztucker4 ztucker4 merged commit 1bbf044 into main Jun 16, 2023
@ztucker4 ztucker4 deleted the SYS-1315/fix_mac_canvas branch June 16, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants