Skip to content

Instantly share code, notes, and snippets.

@clodal
Created January 21, 2021 06:55
Show Gist options
  • Save clodal/722f9b70a159cf157eb087c64aa68c4f to your computer and use it in GitHub Desktop.
Save clodal/722f9b70a159cf157eb087c64aa68c4f to your computer and use it in GitHub Desktop.
M1 Brew Issues with sharp on yarn build with NextJS
# M1 Brew Issues with sharp on yarn build with NextJS
1. Install rosetta2
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
2. Install brew for M1
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
3. Install brew packages like this:
arch -x86_64 brew install <package>
Ref: https://stackoverflow.com/questions/64963370/error-cannot-install-in-homebrew-on-arm-processor-in-intel-default-prefix-usr
Then do these:
4. brew reinstall vips
5. If 4. doesn't work, do brew install vips
6. Then rm -rf node_modules
7. yarn
Voila!
Ref: https://github.com/lovell/sharp/issues/2460#issuecomment-751491241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment