Error installing sharp with npm on macOS 13

153 Views Asked by At

I will install sharp on macos 13.4

I get the following error messages:

In file included from ../src/common.cc:13:
/usr/local/include/vips/vips8:35:10: fatal error: 'glib-object.h' file not found
#include <glib-object.h>
      ^~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp-darwin-x64/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/wang/.nvm/versions/node/v18.18.2/lib/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 22.5.0
gyp ERR! command "/Users/wang/.nvm/versions/node/v18.18.2/bin/node" "/Users/wang/.nvm/versions/node/v18.18.2/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/wang/Tmp/strapi-project/node_modules/sharp

I have already installed the dependencies through brew

brew install vips glib

glib path is : /usr/local/Cellar/glib/2.78.1 and PKG_CONFIG_PATH=/usr/local/Cellar/glib/2.78.1/lib/pkgconfig

Any ideas in how I can trace what the problem is?

0

There are 0 best solutions below