How to fix “ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8”

ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8

What happened?

The lib libvips used in the Sharp package that is required to convert large images into common format couldn’t be compiled under darwin-arm64v8 architecture.

Get the right npm version through nvm

If Npm has not been installed through nvm run these command lines and install a version compatible with Apple Silicon M1 devices (here I took the latest version).

$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
$ brew uninstall node
$ nvm install v15.6.0
$ nvm use v15.6.0
$ nvm alias default v15.6.0

Building libvips from a source tarball

Download vips-x.y.z.tar.gz from the Download area, then run these commands to install required packages for vips.

$ tar xf vips-x.y.z.tar.gz
$ brew install pkg-config glib zlib
$ brew install libjpeg-turbo libpng webp
$ cd vips-x.y.z
$ PKG_CONFIG_PATH=/opt/homebrew/Cellar/zlib/1.2.11/lib/pkgconfig ./configure
$ make
$ sudo make install

Post-mortem

I got an other issue while running npm start caused by react-refresh-webpack-plugin.

ENV FAST_REFRESH=false npm start 

Sources

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store