Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vips/vips8 file not found #include <vips/vips8> in Ionic cordova in IOS

I found an error in sharp. After that, I found a blog in which they ask to delete sharp from the node module and run sudo npm i.

I have gone through GitHub and write minipass - 2.7.0

After that, I got a new error in

vips/vips8 file not found #include <vips/vips8>

I'm using Ionic with Angular on Macbook

Image

I use commands which is

1.sudo npm install
2.sudo npm i gulp-sass -ES --unsafe-perm=true
3.sudo ionic cordova platform add ios
like image 666
Pritesh Avatar asked Feb 25 '21 06:02

Pritesh


2 Answers

I very recently ran into a similar issue after making some changes to a project's package.json on my Mac (not an Angular or Cordova project).

I came across this GitHub issue for the sharp package which mentioned you may need to update the globally-installed version of libvips: https://github.com/lovell/sharp/issues/1148

In my case, since I use Homebrew but had not directly installed this package previously, I was able to resolve by running brew install vips and then re-running npm install. Note that it has a lot of dependencies so installation may take some time.

Edit: if that doesn't work, you may need to try a fresh install by removing node_modules, then re-running npm i.

like image 67
gorner Avatar answered Nov 15 '22 03:11

gorner


This might be not applicable to everyone, but remove package-lock.json and node_modules directory first and then try npm install again. (I also added the minipass in my package.json, by the way)

In my case, I had encountered the same error, but I could solve it by doing the above.

like image 27
James Yoo Avatar answered Nov 15 '22 02:11

James Yoo