hiredis-node icon indicating copy to clipboard operation
hiredis-node copied to clipboard

../src/reader.cc:55:33: error: no matching member function for call to 'ToString'

Open SamuelMarks opened this issue 4 years ago • 0 comments

Upgrading Node.js from 10.16.3 to 12.13.0 causes this error:

$ npm i hiredis
NO_DEBUG set

> [email protected] install /private/tmp/a/node_modules/hiredis
> node-gyp rebuild

NO_DEBUG set
  CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o
  LIBTOOL-STATIC Release/hiredis-c.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
  CXX(target) Release/obj.target/hiredis/src/reader.o
../src/reader.cc:21:17: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        larray->Set(task->idx,v);
                ^
/Users/username/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/username/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/reader.cc:55:33: error: no matching member function for call to 'ToString'
        v = Exception::Error(v->ToString());
                             ~~~^~~~~~~~
/Users/username/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but
      no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/username/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but
      no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
1 warning and 1 error generated.
make: *** [Release/obj.target/hiredis/src/reader.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:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/Users/username/n/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/a/node_modules/hiredis
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/a/package.json'
npm WARN a No description
npm WARN a No repository field.
npm WARN a No README data
npm WARN a No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
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/2019-11-04T04_39_48_183Z-debug.lo

SamuelMarks avatar Nov 04 '19 04:11 SamuelMarks