vue-storefront-api
vue-storefront-api copied to clipboard
npm install resulting `fatal error: glib-object.h: No such file or directory` issue
Followed the manual installation guide in my local machine ubuntu 18.04
- git clone https://github.com/DivanteLtd/vue-storefront-api.git vue-storefront-api
- cd vue-storefront-api
- npm install
- docker-compose up
While installing npm packages having an issue as fatal error: glib-object.h: No such file or directory
I researched quite a bit and found that its something related to sharp
node_modules. Can anyone help me here?
note from me:
sharp
package requires specific versions of libvips:
http://sharp.pixelplumbing.com/en/stable/changelog/
but since nothing can be found on the system that matches the requirement, it tries to build the correct libvips from source.
Docs should state clearly that either specific vips is installed or build tools should be installed on the system (and then state which build tools are required). JUST installing sudo apt-get install glib2.0-dev
won't work for ubuntu OS.
@janmyszkier could you, please, propose a PR with information you mentioned to vue-storefront docs in the Requirements of the linux installation guide?
@lukeromanowicz selftnote to try to reproduce this today:
- setup DO droplet with ubuntu 18.04
- git clone https://github.com/DivanteLtd/vue-storefront-api.git vue-storefront-api
- apt update && apt install npm && apt install docker-compose
- cd vue-storefront-api
- npm install
- docker-compose up
- apt remove libvips
I will come up with a PR once I'm able to reproduce this
currently I'm getting stuck on Removing x-pack...
from ES
cannot reproduce this and getting:
root@vsf-api-209:/tmp/vue-storefront-api# npm cache clean
root@vsf-api-209:/tmp/vue-storefront-api# npm rebuild sharp
> [email protected] install /tmp/vue-storefront-api/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using existing vendored libvips v8.7.0
make: Entering directory '/tmp/vue-storefront-api/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
CXX(target) Release/obj.target/sharp/src/metadata.o
CXX(target) Release/obj.target/sharp/src/stats.o
CXX(target) Release/obj.target/sharp/src/operations.o
CXX(target) Release/obj.target/sharp/src/pipeline.o
CXX(target) Release/obj.target/sharp/src/sharp.o
CXX(target) Release/obj.target/sharp/src/utilities.o
SOLINK_MODULE(target) Release/obj.target/sharp.node
COPY Release/sharp.node
make: Leaving directory '/tmp/vue-storefront-api/node_modules/sharp/build'
[email protected] /tmp/vue-storefront-api/node_modules/sharp
removing system libvips
and glib2.0-dev
still produces same (correct) output.