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

#include <glib-object.h> vips/vips8 #2770

Closed
danielehrhardt opened this issue Jun 28, 2021 · 5 comments
Closed

#include <glib-object.h> vips/vips8 #2770

danielehrhardt opened this issue Jun 28, 2021 · 5 comments

Comments

@danielehrhardt
Copy link

npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/common.cc:24:0:
npm ERR! /usr/include/vips/vips8:35:10: fatal error: glib-object.h: No such file or directory
npm ERR!  #include <glib-object.h>
npm ERR!           ^~~~~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [Release/obj.target/sharp/src/common.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/var/www/vhosts//node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Linux 4.15.0-88-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/var/www/vhosts/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /var/www/vhosts//node_modules/sharp
npm ERR! gyp ERR! node -v v14.17.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

What is the output of running npx envinfo --binaries --system?

  System:
    OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver)
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 7.77 GB / 62.90 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 14.17.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.13 - /usr/local/bin/npm
@lovell
Copy link
Owner

lovell commented Jun 28, 2021

Did you see the documentation relating to installation?

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?

What is the complete output of running npm install --verbose sharp?

@danielehrhardt
Copy link
Author

I updated to Ubuntu 20 and the latest sharp Version now it does work.

@dpkirchner
Copy link

I was seeing this on one out of several applications, all using 0.28.3. In the successful services, the package-lock.json entry for node_modules/sharp[0] had "hasInstallScript": true in its object while the failing service did not. Manually adding that to the object[1] in package-lock.json fixed the problem for me.

[0] The full path to the object is: packages["node_modules/sharp"] if you're on lockfileVersion: 2. I don't know what it is for v1.
[1] The full working object for me (running npm version 7.15.1 on macOS Big Sur 11.4 amd64) is:

    "node_modules/sharp": {
      "version": "0.28.3",
      "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.28.3.tgz",
      "integrity": "sha512-21GEP45Rmr7q2qcmdnjDkNP04Ooh5v0laGS5FDpojOO84D1DJwUijLiSq8XNNM6e8aGXYtoYRh3sVNdm8NodMA==",
      "hasInstallScript": true,
      "dependencies": {
        "color": "^3.1.3",
        "detect-libc": "^1.0.3",
        "node-addon-api": "^3.2.0",
        "prebuild-install": "^6.1.2",
        "semver": "^7.3.5",
        "simple-get": "^3.1.0",
        "tar-fs": "^2.1.1",
        "tunnel-agent": "^0.6.0"
      },
      "engines": {
        "node": ">=10"
      }
    },

@lovell
Copy link
Owner

lovell commented Jul 2, 2021

@dpkirchner I think you've run into npm/cli#2606

@dpkirchner
Copy link

dpkirchner commented Jul 5, 2021 via email

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

No branches or pull requests

3 participants