Yarn install fails on M1 Macs due to using old version of sharp
Author: mattaningramCreated Jun 23, 2021Updated Nov 9, 2024
Description
Cannot successfully yarn install in a Gridsome project on an M1 Mac due to a dependency using an older version of sharp which cannot be built on arm64. Sharp has been updated since to work on M1 Mac https://github.com/lovell/sharp/issues/2460 but Gridsome is not using this version.
Steps to reproduce
Try running yarn install in this project on an M1 Mac: https://github.com/ingram-projects/animxyz
Expected result
yarn install should complete successfully.
Actual result
yarn install fails when attempting to build sharp. Error message:

Source: gridsome/gridsome