[email protected] install error

Created on 3 Jul 2019  Â·  4Comments  Â·  Source: lovell/sharp

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

$ npm install --verbose sharp
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '--verbose', 'sharp' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 7a1447b5e663092b
npm http fetch GET 304 https://registry.npmjs.org/sharp 347ms (from cache)
npm timing stage:loadCurrentTree Completed in 3106ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 32ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1881ms
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 52ms
npm http fetch GET 200 https://registry.npmjs.org/fs-copy-file-sync 80ms
npm http fetch GET 304 https://registry.npmjs.org/semver 81ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/tunnel-agent 86ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/simple-get 87ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/prebuild-install 95ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/node-abi 21ms
npm http fetch GET 200 https://registry.npmjs.org/which-pm-runs 21ms
npm http fetch GET 200 https://registry.npmjs.org/napi-build-utils 30ms
npm http fetch GET 200 https://registry.npmjs.org/tar-fs 35ms
npm http fetch GET 200 https://registry.npmjs.org/noop-logger 45ms
npm http fetch GET 200 https://registry.npmjs.org/github-from-package 53ms
npm http fetch GET 304 https://registry.npmjs.org/minimist 55ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/expand-template 59ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/pump 21ms
npm http fetch GET 304 https://registry.npmjs.org/pump/-/pump-1.0.3.tgz 30ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 8194ms
npm timing stage:loadIdealTree Completed in 10850ms
npm timing stage:generateActionsToTake Completed in 122ms
npm verb correctMkdir /home/khteh/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/khteh/.npm/_locks/staging-74a0e6b285e965cd.lock for /usr/src/4xlabs/bz-ui2/node_modules/.staging
npm timing action:extract Completed in 213ms
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm verb unbuild rmStuff [email protected] from /usr/src/4xlabs/bz-ui2/node_modules
npm info lifecycle [email protected]~postuninstall: [email protected]
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm verb unbuild rmStuff [email protected] from /usr/src/4xlabs/bz-ui2/node_modules
npm verb unbuild rmStuff in /usr/src/4xlabs/bz-ui2/node_modules/sharp/node_modules
npm info lifecycle [email protected]~postuninstall: [email protected]
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm verb unbuild rmStuff [email protected] from /usr/src/4xlabs/bz-ui2/node_modules
npm verb unbuild rmStuff in /usr/src/4xlabs/bz-ui2/node_modules/sharp/node_modules
npm info lifecycle [email protected]~postuninstall: [email protected]
npm timing action:unbuild Completed in 8ms
npm timing action:remove Completed in 22ms
npm timing action:finalize Completed in 80ms
npm timing action:refresh-package-json Completed in 109ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 0ms
npm info linkStuff [email protected]
npm timing action:build Completed in 6ms
npm info lifecycle [email protected]~install: [email protected]

> [email protected] install /usr/src/4xlabs/bz-ui2/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz
prebuild-install info begin Prebuild-install version 5.3.0
prebuild-install info looking for cached prebuild @ /home/khteh/.npm/_prebuilds/37a21b-sharp-v0.22.1-node-v72-linux-x64.tar.gz
prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.22.1/sharp-v0.22.1-node-v72-linux-x64.tar.gz
prebuild-install http 200 https://github.com/lovell/sharp/releases/download/v0.22.1/sharp-v0.22.1-node-v72-linux-x64.tar.gz
prebuild-install info downloading to @ /home/khteh/.npm/_prebuilds/37a21b-sharp-v0.22.1-node-v72-linux-x64.tar.gz.7792-008d4852650cb.tmp
prebuild-install info renaming to @ /home/khteh/.npm/_prebuilds/37a21b-sharp-v0.22.1-node-v72-linux-x64.tar.gz
prebuild-install info unpacking @ /home/khteh/.npm/_prebuilds/37a21b-sharp-v0.22.1-node-v72-linux-x64.tar.gz
prebuild-install info unpack resolved to /usr/src/4xlabs/bz-ui2/node_modules/sharp/build/Release/sharp.node
prebuild-install info unpack required /usr/src/4xlabs/bz-ui2/node_modules/sharp/build/Release/sharp.node successfully
prebuild-install info install Successfully installed prebuilt binary!
npm verb lifecycle [email protected]~install: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/4xlabs/bz-ui2/node_modules/sharp/node_modules/.bin:/usr/src/4xlabs/bz-ui2/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/khteh/.dotnet/tools
npm verb lifecycle [email protected]~install: CWD: /usr/src/4xlabs/bz-ui2/node_modules/sharp
npm timing audit submit Completed in 911ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 911ms
npm timing audit body Completed in 2ms
npm timing action:install Completed in 8914ms
npm info lifecycle [email protected]~postinstall: [email protected]
npm timing action:postinstall Completed in 2ms
npm verb unlock done using /home/khteh/.npm/_locks/staging-74a0e6b285e965cd.lock for /usr/src/4xlabs/bz-ui2/node_modules/.staging
npm timing stage:executeActions Completed in 9380ms
npm timing stage:rollbackFailedOptional Completed in 65ms
npm timing stage:runTopLevelLifecycles Completed in 24105ms
npm verb saving [ { name: 'sharp', spec: '^0.22.1', save: 'dependencies' } ]
npm verb shrinkwrap skipping write for package.json because there were no changes.
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 1.7.0 || ^1.7.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@~2.7.1 || >=2.8.0-dev || >=2.9.0-dev || ~3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN bz-ui2 No repository field.
npm WARN bz-ui2 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
npm verb notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64

+ [email protected]
removed 2 packages, updated 1 package and audited 43933 packages in 25.386s
found 28 vulnerabilities (14 low, 8 moderate, 6 high)
  run `npm audit fix` to fix them, or `npm audit` for details
npm verb exit [ 0, true ]
npm timing npm Completed in 25572ms
npm info ok

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

$ npx envinfo --binaries --languages --system --utilities
npx: installed 1 in 0.644s

  System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 536.79 MB / 23.20 GB
    Container: Yes
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 12.5.0 - /usr/bin/node
    npm: 6.9.2 - /usr/local/bin/npm
  Utilities:
    Make: 4.2.1 - /usr/bin/make
    GCC: 8.3.0 - /usr/bin/gcc
    Git: 2.20.1 - /usr/bin/git
  Languages:
    Bash: 5.0.3 - /usr/bin/bash
    Perl: 5.28.1 - /usr/bin/perl
    Python: 3.7.3 - /usr/bin/python

Have you ensured the platform and version of Node.js used for npm install is the same as the platform and version of Node.js used at runtime?

Errors when running npm install:

1075 verbose stack Error: [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
1075 verbose stack Exit status 1
1075 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
1075 verbose stack     at EventEmitter.emit (events.js:200:13)
1075 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1075 verbose stack     at ChildProcess.emit (events.js:200:13)
1075 verbose stack     at maybeClose (internal/child_process.js:1021:16)
1075 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
1076 verbose pkgid [email protected]
1077 verbose cwd /usr/src/4xlabs/bz-ui2
1078 verbose Linux 5.0.0-20-generic
1079 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
1080 verbose node v12.5.0 
1081 verbose npm  v6.9.0  
1082 error code ELIFECYCLE
1083 error errno 1 
1084 error [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
1084 error Exit status 1
1085 error Failed at the [email protected] install script. 
1085 error This is probably not a problem with npm. There is likely additional logging output above.
1086 verbose exit [ 1, true ]
question

All 4 comments

More detailed error:

prebuild-install WARN install No prebuilt binaries found (target=12.5.0 runtime=node arch=x64 platform=linux)
make: Entering directory '/usr/src/4xlabs/bz-ui2/node_modules/gulp-responsive/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:24:
../../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from ../src/common.cc:27:
../src/common.h: At global scope:
../src/common.h:82:20: error: ‘Handle’ is not a member of ‘v8’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                    ^~~~~~
../src/common.h:82:37: error: expected primary-expression before ‘>’ token
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                     ^
../src/common.h:82:39: error: ‘obj’ was not declared in this scope
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                       ^~~
../src/common.h:82:56: error: expected primary-expression before ‘attr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                                        ^~~~
../src/common.h:82:60: error: expression list treated as compound expression in initializer [-fpermissive]
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                                            ^
../src/common.h:83:29: error: ‘Handle’ is not a member of ‘v8’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                             ^~~~~~
../src/common.h:83:46: error: expected primary-expression before ‘>’ token
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                              ^
../src/common.h:83:48: error: ‘obj’ was not declared in this scope
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                                ^~~
../src/common.h:83:65: error: expected primary-expression before ‘attr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                                                 ^~~~
../src/common.h:84:48: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                ^~~~~~
../src/common.h:84:65: error: expected primary-expression before ‘>’ token
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                 ^
../src/common.h:84:67: error: ‘obj’ was not declared in this scope
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                   ^~~
../src/common.h:84:84: error: expected primary-expression before ‘attr’
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                                    ^~~~
../src/common.h:84:37: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^~~~~~
../src/common.h:84:89: error: expected ‘;’ before ‘{’ token
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                                         ^~
                                                                                         ;
../src/common.h:87:37: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^~~~~~
../src/common.h:87:54: error: expected primary-expression before ‘>’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                      ^
../src/common.h:87:56: error: ‘obj’ was not declared in this scope
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                        ^~~
../src/common.h:87:73: error: expected primary-expression before ‘attr’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                                         ^~~~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                          ^~~~~~
../src/common.h:87:78: error: expected ‘;’ before ‘{’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                                              ^~
                                                                              ;
../src/common.h:90:37: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                     ^~~~~~
../src/common.h:90:54: error: expected primary-expression before ‘>’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                      ^
../src/common.h:90:56: error: ‘obj’ was not declared in this scope
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                        ^~~
../src/common.h:90:61: error: expected primary-expression before ‘int’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                             ^~~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                          ^~~~~~
../src/common.h:90:70: error: expected ‘;’ before ‘{’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                                      ^~
                                                                      ;
../src/common.h:96:9: error: ‘Handle’ is not a member of ‘v8’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
         ^~~~~~
../src/common.h:96:26: error: expected primary-expression before ‘>’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                          ^
../src/common.h:96:28: error: ‘input’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                            ^~~~~
../src/common.h:96:28: note: suggested alternative: ‘ino_t’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                            ^~~~~
                            ino_t
../src/common.h:96:70: error: expected primary-expression before ‘&’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                      ^
../src/common.h:96:71: error: ‘buffersToPersist’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                       ^~~~~~~~~~~~~~~~
../src/common.h:96:87: error: expression list treated as compound expression in initializer [-fpermissive]
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                                       ^
../src/common.cc:34:20: error: redefinition of ‘bool sharp::HasAttr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                    ^~~~~~
In file included from ../src/common.cc:27:
../src/common.h:82:8: note: ‘bool sharp::HasAttr’ previously defined here
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
        ^~~~~~~
../src/common.cc:34:20: error: ‘Handle’ is not a member of ‘v8’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                    ^~~~~~
../src/common.cc:34:37: error: expected primary-expression before ‘>’ token
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^
../src/common.cc:34:39: error: ‘obj’ was not declared in this scope
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                       ^~~
../src/common.cc:34:56: error: expected primary-expression before ‘attr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                                        ^~~~
../src/common.cc:37:29: error: redefinition of ‘std::string sharp::AttrAsStr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                             ^~~~~~
In file included from ../src/common.cc:27:
../src/common.h:83:15: note: ‘std::string sharp::AttrAsStr’ previously declared here
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
               ^~~~~~~~~
../src/common.cc:37:29: error: ‘Handle’ is not a member of ‘v8’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                             ^~~~~~
../src/common.cc:37:46: error: expected primary-expression before ‘>’ token
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                              ^
../src/common.cc:37:48: error: ‘obj’ was not declared in this scope
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                                ^~~
../src/common.cc:37:65: error: expected primary-expression before ‘attr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                                                 ^~~~
../src/common.cc:43:9: error: redefinition of ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
         ^~~~~~
In file included from ../src/common.cc:27:
../src/common.h:95:20: note: ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’ previously defined here
   InputDescriptor* CreateInputDescriptor(
                    ^~~~~~~~~~~~~~~~~~~~~
../src/common.cc:43:9: error: ‘Handle’ is not a member of ‘v8’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
         ^~~~~~
../src/common.cc:43:26: error: expected primary-expression before ‘>’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                          ^
../src/common.cc:43:28: error: ‘input’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                            ^~~~~
../src/common.cc:43:28: note: suggested alternative: ‘ino_t’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                            ^~~~~
                            ino_t
../src/common.cc:43:70: error: expected primary-expression before ‘&’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                                                                      ^
../src/common.cc:43:71: error: ‘buffersToPersist’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                                                                       ^~~~~~~~~~~~~~~~
In file included from /home/khteh/.node-gyp/12.5.0/include/node/node.h:63,
                 from ../src/common.cc:22:
/home/khteh/.node-gyp/12.5.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/khteh/.node-gyp/12.5.0/include/node/node_object_wrap.h:84:78:   required from here
/home/khteh/.node-gyp/12.5.0/include/node/v8.h:9846:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/khteh/.node-gyp/12.5.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../../../nan/nan_object_wrap.h:65:61:   required from here
/home/khteh/.node-gyp/12.5.0/include/node/v8.h:9846:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make: *** [sharp.target.mk:132: Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/usr/src/4xlabs/bz-ui2/node_modules/gulp-responsive/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.0.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/src/4xlabs/bz-ui2/node_modules/gulp-responsive/node_modules/sharp
gyp ERR! node -v v12.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 1.7.0 || ^1.7.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@~2.7.1 || >=2.8.0-dev || >=2.9.0-dev || ~3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN bz-ui2 No repository field.
npm WARN bz-ui2 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/khteh/.npm/_logs/2019-07-03T03_59_19_828Z-debug.log

Node.js 12 support was added in v0.22.1.

https://sharp.pixelplumbing.com/en/stable/changelog/#v0221-25th-april-2019

Is Node.js 13 supported? I'm seeing the following errors when attempting to install Sharp with Node 13.

$node --version
v13.6.0
$ npm --version
6.13.4

In Ubuntu Linux 19.10.

> [email protected] install /home/curran/repos/vizhub/packages/imageGenerationService/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

make: Entering directory '/home/curran/repos/vizhub/packages/imageGenerationService/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
make: Leaving directory '/home/curran/repos/vizhub/packages/imageGenerationService/node_modules/sharp/build'

lerna ERR! npm install stderr:
info sharp Using cached /home/curran/.npm/_libvips/libvips-8.7.4-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=13.6.0 runtime=node arch=x64 libc= platform=linux)
../src/stats.cc: In member function ‘virtual void StatsWorker::HandleOKCallback()’:
../src/stats.cc:130:37: error: no matching function for call to ‘v8::Array::Set(int&, v8::Local<v8::Object>&)’
  130 |         channels->Set(i, channelStat);
      |                                     ^
In file included from /home/curran/.cache/node-gyp/13.6.0/include/node/node.h:63,
                 from ../src/stats.cc:19:
/home/curran/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
 3547 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
/home/curran/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/home/curran/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
 3550 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
      |                                     ^~~
/home/curran/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
make: *** [sharp.target.mk:138: Release/obj.target/sharp/src/stats.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/curran/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.3.0-18-generic
gyp ERR! command "/home/curran/.nvm/versions/node/v13.6.0/bin/node" "/home/curran/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/curran/repos/vizhub/packages/imageGenerationService/node_modules/sharp
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

Support for Node.js 13 was added in sharp v0.23.2.

https://sharp.pixelplumbing.com/en/stable/changelog/#v0232-28th-october-2019

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulieo10 picture paulieo10  Â·  3Comments

AVVS picture AVVS  Â·  3Comments

henbenla picture henbenla  Â·  3Comments

zilions picture zilions  Â·  3Comments

genifycom picture genifycom  Â·  3Comments