Skip to content

Instantly share code, notes, and snippets.

@imurchie
Created May 7, 2019 15:00
Show Gist options
  • Save imurchie/7a983673d70724d56dccd0302a73715f to your computer and use it in GitHub Desktop.
Save imurchie/7a983673d70724d56dccd0302a73715f to your computer and use it in GitHub Desktop.
mjpeg-consumer install error on Node 12
npm install --no-save mjpeg-consumer  ✔  12.1.0 ⬢  10:58:03
> buffertools@2.1.6 install /Users/isaac/code/appium-support/node_modules/buffertools
> node-gyp rebuild
CXX(target) Release/obj.target/buffertools/buffertools.o
../buffertools.cc:32:11: error: no member named 'Handle' in namespace 'v8'
using v8::Handle;
~~~~^
../buffertools.cc:141:25: error: no matching member function for call to 'ToObject'
target = args[0]->ToObject();
~~~~~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:143:7: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::TypeError,
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:169:25: error: no matching member function for call to 'ToObject'
target = args[0]->ToObject();
~~~~~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:171:7: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::TypeError,
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:177:25: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value s(args[args_start]);
^ ~~~~~~~~~~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../buffertools.cc:187:47: error: no matching member function for call to 'ToObject'
Local<Object> other = args[args_start]->ToObject();
~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:196:5: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::TypeError,
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:256:44: error: too few arguments to function call, single argument 'context' was not specified
int c = args[args_start]->Int32Value();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../buffertools.cc:261:25: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value s(args[args_start]);
^ ~~~~~~~~~~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../buffertools.cc:266:47: error: no matching member function for call to 'ToObject'
Local<Object> other = args[args_start]->ToObject();
~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:272:5: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::TypeError,
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:329:54: error: too few arguments to function call, single argument 'context' was not specified
int32_t start = args[args_start + 1]->Int32Value();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../buffertools.cc:363:5: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::Error,
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:381:7: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_EXCEPTION(Exception::Error, "This is not hexadecimal data.");
^
../buffertools.cc:77:26: note: expanded from macro 'UNI_THROW_EXCEPTION'
type(v8::String::NewFromUtf8(args.GetIsolate(), message)));
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:419:12: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
return UNI_STRING_NEW(s.c_str(), s.size());
^
../buffertools.cc:65:17: note: expanded from macro 'UNI_STRING_NEW'
v8::String::NewFromUtf8(args.GetIsolate(), \
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:449:20: error: no matching member function for call to 'ToString'
size += arg->ToString()->Utf8Length();
~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
../buffertools.cc:452:41: error: no matching member function for call to 'ToObject'
size += node::Buffer::Length(arg->ToObject());
~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:460:7: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_AND_RETURN(Exception::TypeError, errmsg);
^
../buffertools.cc:72:28: note: expanded from macro 'UNI_THROW_AND_RETURN'
type(v8::String::NewFromUtf8(args.GetIsolate(), message))); \
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:470:25: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value v(arg);
^ ~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../buffertools.cc:475:30: error: no matching member function for call to 'ToObject'
Local<Object> b = arg->ToObject();
~~~~~^~~~~~~~
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Object> ToObject(Isolate* isolate) const);
^
../buffertools.cc:482:7: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
UNI_THROW_AND_RETURN(Exception::Error,
^
../buffertools.cc:72:28: note: expanded from macro 'UNI_THROW_AND_RETURN'
type(v8::String::NewFromUtf8(args.GetIsolate(), message))); \
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8config.h:307:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../buffertools.cc:492:6: error: variable has incomplete type 'void'
void RegisterModule(Handle<Object> target) {
^
../buffertools.cc:492:21: error: use of undeclared identifier 'Handle'
void RegisterModule(Handle<Object> target) {
^
../buffertools.cc:492:28: error: 'Object' does not refer to a value
void RegisterModule(Handle<Object> target) {
^
/Users/isaac/.node-gyp/12.1.0/include/node/v8.h:3356:17: note: declared here
class V8_EXPORT Object : public Value {
^
../buffertools.cc:492:36: error: use of undeclared identifier 'target'
void RegisterModule(Handle<Object> target) {
^
../buffertools.cc:492:43: error: expected ';' after top level declarator
void RegisterModule(Handle<Object> target) {
^
;
9 warnings and 18 errors generated.
make: *** [Release/obj.target/buffertools/buffertools.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/isaac/.nvm/versions/node/v12.1.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Users/isaac/.nvm/versions/node/v12.1.0/bin/node" "/Users/isaac/.nvm/versions/node/v12.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/isaac/code/appium-support/node_modules/buffertools
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! buffertools@2.1.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffertools@2.1.6 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/isaac/.npm/_logs/2019-05-07T14_59_20_107Z-debug.log
@xming12
Copy link

xming12 commented May 14, 2019

这个怎么解决啊

@ecsmaah
Copy link

ecsmaah commented Jul 8, 2019

status on this please!

@imurchie
Copy link
Author

imurchie commented Jul 8, 2019

None to be given. Still doesn't work with Node 12.6.0.

@vivektiwar1
Copy link

Still same issue. Please let me know if you find any solution to install buffertools in node 12.

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