Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playground fails to build if vips installed globally #904

Open
dmsnell opened this issue Dec 25, 2023 · 1 comment
Open

Playground fails to build if vips installed globally #904

dmsnell opened this issue Dec 25, 2023 · 1 comment

Comments

@dmsnell
Copy link
Member

dmsnell commented Dec 25, 2023

Could not install the npm dependencies and noticed this error:

npm ERR! code 1
npm ERR! path /Users/dmsnell/code/a8c/wordpress-playground/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c -- (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Detected globally-installed libvips v8.15.0
npm ERR! sharp: Building from source via node-gyp
npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
npm ERR!   CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   CXX(target) Release/obj.target/sharp-darwin-arm64v8/src/common.o
npm ERR! gyp info it worked if it ends with ok
…
npm ERR! Package libarchive was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `libarchive.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! Package 'libarchive', required by 'vips', not found

After I removed vips from my system I was able to npm ci again without problem. Not sure if it's possible to prevent this, but it's surprising that the local build fails because of a global package.

@eliot-akira
Copy link
Collaborator

eliot-akira commented Dec 27, 2023

Apparently the issue is specific to libvips installed via Homebrew.

Following some clues/leads:

So the solution is probably to update the Homebrew formula to vips 8.15.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants