node-inotify: Install Failed [ iNotify v1.4.4 | Node v13.5.0 | Node-Gyp v6.1.0 ]

Tried to use npm install inotify

inotify@1.4.4 node@13.5.0 node-gyp@6.1.0

In file included from ../src/node_inotify.h:14,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2294: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/bindings.cc:2:
../src/bindings.h: At global scope:
../src/bindings.h:10:27: error: ‘Handle’ has not been declared
    static void Initialize(Handle<Object> target);
                           ^~~~~~
../src/bindings.h:10:33: error: expected ‘,’ or ‘...’ before ‘<’ token
    static void Initialize(Handle<Object> target);
                                 ^
../src/bindings.cc:11:27: error: variable or field ‘Initialize’ declared void
  void Inotify::Initialize(Handle<Object> exports) {
                           ^~~~~~
../src/bindings.cc:11:27: error: ‘Handle’ was not declared in this scope
../src/bindings.cc:11:27: note: suggested alternative: ‘rand_r’
  void Inotify::Initialize(Handle<Object> exports) {
                           ^~~~~~
                           rand_r
../src/bindings.cc:11:40: error: expected primary-expression before ‘>’ token
  void Inotify::Initialize(Handle<Object> exports) {
                                        ^
../src/bindings.cc:11:42: error: ‘exports’ was not declared in this scope
  void Inotify::Initialize(Handle<Object> exports) {
                                          ^~~~~~~
../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::AddWatch(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bindings.cc:146:43: error: no matching function for call to ‘v8::Value::ToObject()’
   Local<Object> args_ = info[0]->ToObject();
                                           ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2754:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2754:44: note:   candidate expects 1 argument, 0 provided
../src/bindings.cc:149:27: error: no matching function for call to ‘v8::Object::Has(v8::Local<v8::String>&)’
   if (!args_->Has(path_sym)) {
                           ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:154:31: error: no matching function for call to ‘v8::Object::Has(v8::Local<v8::String>&)’
   if (!args_->Has(callback_sym) ||
                               ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:155:28: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
    !args_->Get(callback_sym)->IsFunction()) {
                            ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:160:32: error: no matching function for call to ‘v8::Object::Has(v8::Local<v8::String>&)’
   if (!args_->Has(watch_for_sym)) {
                                ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3629:37: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3635:37: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:163:33: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
    if (!args_->Get(watch_for_sym)->IsInt32()) {
                                 ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:166:36: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
    mask |= args_->Get(watch_for_sym)->Int32Value();
                                    ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:172:45: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
   String::Utf8Value path(args_->Get(path_sym));
                                             ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:182:61: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
   inotify->handle()->Set(descriptor, args_->Get(callback_sym));
                                                             ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::RemoveWatch(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bindings.cc:195:31: error: no matching function for call to ‘v8::Value::Int32Value()’
   watch = info[0]->Int32Value();
                               ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2778:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^~~~~~~~~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2778:40: note:   candidate expects 1 argument, 0 provided
../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify::Callback(uv_poll_t*, int, int)’:
../src/bindings.cc:262:86: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     obj->Set(Nan::New<String>("watch").ToLocalChecked(), Nan::New<Integer>(event->wd));
                                                                                      ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
../src/bindings.cc:263:87: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     obj->Set(Nan::New<String>("mask").ToLocalChecked(), Nan::New<Integer>(event->mask));
                                                                                       ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
../src/bindings.cc:264:91: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     obj->Set(Nan::New<String>("cookie").ToLocalChecked(), Nan::New<Integer>(event->cookie));
                                                                                           ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
../src/bindings.cc:267:104: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’
      obj->Set(Nan::New<String>("name").ToLocalChecked(), Nan::New<String>(event->name).ToLocalChecked());
                                                                                                        ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3547:37: note:   candidate expects 3 arguments, 2 provided
/home/developer/.cache/node-gyp/13.5.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>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3550:37: note:   candidate expects 3 arguments, 2 provided
../src/bindings.cc:275:66: error: no matching function for call to ‘v8::Object::Get(Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     Local<Value> value = handle->Get(Nan::New<Integer>(event->wd));
                                                                  ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../src/bindings.cc:279:34: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback.Call(handle, 1, argv);
                                  ^
In file included from ../src/node_inotify.h:14,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
../../nan/nan.h:1720:3: note: declared here
   Call(v8::Local<v8::Object> target
   ^~~~
../src/bindings.cc:285:34: error: no matching function for call to ‘v8::Value::ToString()’
      handle->Delete(wd->ToString());
                                  ^
In file included from /home/developer/.cache/node-gyp/13.5.0/include/node/node.h:63,
                 from ../src/node_inotify.h:5,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2750:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                            ^~~~~~~~
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:2750:44: note:   candidate expects 1 argument, 0 provided
/home/developer/.cache/node-gyp/13.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/developer/.cache/node-gyp/13.5.0/include/node/node_object_wrap.h:84:78:   required from here
/home/developer/.cache/node-gyp/13.5.0/include/node/v8.h:10400: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/developer/.cache/node-gyp/13.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/developer/.cache/node-gyp/13.5.0/include/node/v8.h:10400: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: *** [inotify.target.mk:110: Release/obj.target/inotify/src/bindings.o] Error 1
make: Leaving directory '/home/developer/Projects/bdc/node_modules/inotify/build'
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:305:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.0-8-amd64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/developer/Projects/bdc/node_modules/inotify
gyp ERR! node -v v13.5.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! inotify@1.4.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the inotify@1.4.4 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/developer/.npm/_logs/2020-04-23T22_35_50_073Z-debug.log

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 3
  • Comments: 21 (7 by maintainers)

Most upvoted comments

For anyone else who discovered this issue after googling their error message, for me this was fixed by switching to node v11.14.0 (previously I was using v14.8.0). At the time of writing, the inotify readme states that only nodejs versions up to v11.x.x are supported.

No, that was with the latest release. Just tried with master and that builds:

$ podman run --rm -it fedora
# cat /etc/system-release
Fedora release 33 (Thirty Three)
# dnf groupinstall "Development Tools"
# dnf install -y nodejs gcc-g++
# node --version
v14.14.0
# npm install https://github.com/c4milo/node-inotify.git
[...]
+ inotify@1.4.6
added 4 packages from 18 contributors and audited 4 packages in 6.662s
found 0 vulnerabilities

@rileyweber13, thanks for the extra clarification! We added support for Node 14 in https://github.com/c4milo/node-inotify/commit/5d12f6489498015c32ec5f7ea2f399563531fcd9 but, unfortunately, I haven’t had time to properly test it before tagging a release.

It looks like the fix is simply to update bindings to 1.5.0. Simply updating that in the package.json and it now installs fine without needing to inject the rebuild.

Sorry, what exactly does that mean? Can you tell me what file to edit, and how to edit it?

Same error here… @c4milo could you please try to push a version that works?

Either that or just deprecate the whole project (in npmjs too).

Thanks for your answers guys!

When installing from master I get errors too, but it seems to install it. Could it be the version of npm, 6.14.12?

$ npm i -g https://github.com/c4milo/node-inotify.git

> inotify@1.4.6 install /home/myuser/.nvm/versions/node/v12.18.2/lib/node_modules/inotify
> node-gyp rebuild

make: Entering directory '/home/myuser/.nvm/versions/node/v12.18.2/lib/node_modules/inotify/build'
  CXX(target) Release/obj.target/inotify/src/bindings.o
../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify::Initialize(v8::Local<v8::Object>)’:
../src/bindings.cc:29:69: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
   29 |   exports->Set(ctx, Nan::New<String>("Inotify").ToLocalChecked(), fn);
      |                                                                     ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::AddWatch(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/bindings.cc:190:89: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  190 |   inotify->handle()->Set(ctx, descriptor, args_->Get(ctx, callback_sym).ToLocalChecked());
      |                                                                                         ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify::Callback(uv_poll_t*, int, int)’:
../src/bindings.cc:274:91: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  274 |     obj->Set(ctx, Nan::New<String>("watch").ToLocalChecked(), Nan::New<Integer>(event->wd));
      |                                                                                           ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc:275:92: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  275 |     obj->Set(ctx, Nan::New<String>("mask").ToLocalChecked(), Nan::New<Integer>(event->mask));
      |                                                                                            ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc:276:96: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  276 |     obj->Set(ctx, Nan::New<String>("cookie").ToLocalChecked(), Nan::New<Integer>(event->cookie));
      |                                                                                                ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc:279:109: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  279 |      obj->Set(ctx, Nan::New<String>("name").ToLocalChecked(), Nan::New<String>(event->name).ToLocalChecked());
      |                                                                                                             ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/bindings.cc:297:60: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Delete(v8::Local<v8::Context>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  297 |      handle->Delete(ctx, wd->ToString(ctx).ToLocalChecked());
      |                                                            ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/bindings.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3593:37: note: declared here
 3593 |   V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context,
      |                                     ^~~~~~
  CXX(target) Release/obj.target/inotify/src/node_inotify.o
../src/node_inotify.cc: In function ‘void NodeInotify::InitializeInotify(v8::Local<v8::Object>)’:
../src/node_inotify.cc:16:76: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
   16 |                     Nan::New<String>(NODE_INOTIFY_VERSION).ToLocalChecked());
      |                                                                            ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/node_inotify.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/node_inotify.cc:18:93: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
   18 |         context->Global()->Set(context,Nan::New<String>("Inotify").ToLocalChecked(), exports);
      |                                                                                             ^
In file included from /home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/node_inotify.cc:2:
/home/myuser/.cache/node-gyp/12.18.2/include/node/v8.h:3504:37: note: declared here
 3504 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../src/node_inotify.cc:12:14: warning: unused variable ‘i’ [-Wunused-variable]
   12 |         auto i = v8::Isolate::GetCurrent();
      |              ^
In file included from ../src/node_inotify.h:15,
                 from ../src/bindings.h:4,
                 from ../src/node_inotify.cc:2:
../src/node_inotify.cc: At global scope:
/home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:608:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  608 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/home/myuser/.cache/node-gyp/12.18.2/include/node/node.h:642:3: note: in expansion of macro ‘NODE_MODULE_X’
  642 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/node_inotify.cc:27:1: note: in expansion of macro ‘NODE_MODULE’
   27 | NODE_MODULE(inotify, NodeInotify::init)
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/inotify.node
  COPY Release/inotify.node
make: Leaving directory '/home/myuser/.nvm/versions/node/v12.18.2/lib/node_modules/inotify/build'
+ inotify@1.4.6
added 4 packages from 18 contributors in 3.929s

@ashthespy, that’s what I’ve used as well. We should add proper tests.

I’m getting the same error: ‘Handle’ has not been declared error with nodejs-14.14.0, for the record.