Encountered a pesky error that read:
fatal error: 'vips/vips8' file not found
while setting up a React project on my new M2 (Apple Silicon) device.
After sifting through multiple reported issues on StackOverflow and github, I pinpointed the culprit to be vips
. Check out the problem reports below:
- vips/vips8 file not found #include <vips/vips8> in Ionic cordova in IOS
- https://github.com/lovell/sharp/issues/1882
- https://github.com/nuxt/image/issues/204
While the popular solution recommended was brew install vips
, it didn't do the trick for me. Even after confirming that vips
was installed using: which vips
, the error persisted.
Attempting
brew install --build-from-source gcc
also yielded no success.
As a final resort, I ran my entire Terminal in Rosetta as suggested here: but unfortunately, this approach was also futile.
Versions:
yarn
version: 1.22.19node
version: 16.15.1npm
version: 8.11.0sharp
version: 0.27.2