avatars-api-middleware icon indicating copy to clipboard operation
avatars-api-middleware copied to clipboard

Library can't be installed

Open rptoma opened this issue 4 years ago • 5 comments

The library can not be installed.

Node version 14.2.0 npm version 6.14.5

OS: macOS Catalina 10.15.3

I think it is because of the sharp dependency which needs to be updated.

If you try to install that version of sharp in the project, it would give the same error. The latest sharp version works, though.

It might be that that version of sharp is not supported on macOS Catalina: https://github.com/cncf/landscapeapp/issues/475.

> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached /Users/username/.npm/_libvips/libvips-8.7.4-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=14.2.0 runtime=node arch=x64 libc= platform=darwin)
  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
../src/stats.cc:130:19: error: no matching member function for call to 'Set'
        channels->Set(i, channelStat);
        ~~~~~~~~~~^~~
/Users/username/Library/Caches/node-gyp/14.2.0/include/node/v8.h:3639:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/username/Library/Caches/node-gyp/14.2.0/include/node/v8.h:3642:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
1 error generated.
make: *** [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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/Cellar/node/14.2.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/username/Documents/Disertatie/project-name-backend/node_modules/sharp
gyp ERR! node -v v14.2.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

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!     /Users/username/.npm/_logs/2020-05-19T11_38_54_024Z-debug.log
username@s-MacBook-Pro- project-name-backend % 

rptoma avatar May 19 '20 11:05 rptoma

I created a PR #104

rptoma avatar May 19 '20 13:05 rptoma

Hey @rptoma! It looks like you're using a newer version of node than is currently supported. As a temporary workaround, you may be able to use node 10.x as that appears to use a prebuilt version of sharp-libvps.

rylnd avatar Jun 19 '20 02:06 rylnd

Hello there. I think it's a good idea to support the current nodejs version.

antonlukin avatar Aug 01 '20 22:08 antonlukin

Bump: I came across this library of wonderful avatars and I'd like to use it. Sadly, it doesn't support the LTS Nodejs 😞

parostatkiem-zz avatar Jul 30 '21 12:07 parostatkiem-zz

I've just released version 0.5.0, which specifies node >= 10.x and includes an updated version of the sharp package.

rylnd avatar Jan 14 '22 20:01 rylnd