Created
January 21, 2021 06:55
-
-
Save clodal/722f9b70a159cf157eb087c64aa68c4f to your computer and use it in GitHub Desktop.
M1 Brew Issues with sharp on yarn build with NextJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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