как решить проблему,сборка не удалась при нажатии приложения на heroku

#javascript #node.js #heroku

Вопрос:

    npm ERR! code 1

   npm ERR! path /tmp/build_28367a71/node_modules/inotify
   npm ERR! command failed

   npm ERR! command sh -c node-gyp rebuild
 

npm err! сделать: Ввод каталога ‘/tmp/build_28367a71/node_modules/inotify/сборка’

    npm ERR!   CXX(target) Release/obj.target/inotify/src/bindings.o

   npm ERR! make: Leaving directory '/tmp/build_28367a71/node_modules/inotify/build'

   npm ERR! gyp info it worked if it ends with ok

   npm ERR! gyp info using node-gyp@7.1.2

   npm ERR! gyp info using node@16.2.0 | linux | x64
 

я получаю эту проблему,нажимая приложение node js на heroku ,пожалуйста, может кто-нибудь помочь мне исправить это,я новичок в кодировании.
я использую узел версии 16.x

    ```npm ERR!  3976 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! ../src/bindings.cc:166:36: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>amp;)’

   npm ERR!   166 |    mask |= args_->Get(watch_for_sym)->Int32Value();

   npm ERR!       |                                    ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’

   npm ERR!  3973 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’

   npm ERR!  3976 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! ../src/bindings.cc:172:45: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>amp;)’

   npm ERR!   172 |   String::Utf8Value path(args_->Get(path_sym));

   npm ERR!       |                                             ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’

   npm ERR!  3973 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’

   npm ERR!  3976 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! ../src/bindings.cc:182:61: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>amp;)’

   npm ERR!   182 |   inotify->handle()->Set(descriptor, args_->Get(callback_sym));

   npm ERR!       |                                                             ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’

   npm ERR!  3973 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’

   npm ERR!  3976 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! ../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::RemoveWatch(Nan::NAN_METHOD_ARGS_TYPE)’:

   npm ERR! ../src/bindings.cc:195:31: error: no matching function for call to ‘v8::Value::Int32Value()’

   npm ERR!   195 |   watch = info[0]->Int32Value();

   npm ERR!       |                               ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3078:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’

   npm ERR!  3078 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;

   npm ERR!       |                                        ^~~~~~~~~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3078:40: note:   candidate expects 1 argument, 0 provided

   npm ERR! ../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify::Callback(uv_poll_t*, int, int)’:

   npm ERR! ../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)’

   npm ERR!   262 |     obj->Set(Nan::New<String>("watch").ToLocalChecked(), Nan::New<Integer>(event->wd));

   npm ERR!       |                                                                                      ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’

   npm ERR!  3926 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’

   npm ERR!  3929 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! ../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)’

   npm ERR!   263 |     obj->Set(Nan::New<String>("mask").ToLocalChecked(), Nan::New<Integer>(event->mask));

   npm ERR!       |                                                                                       ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’

   npm ERR!  3926 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’

   npm ERR!  3929 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! ../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)’

   npm ERR!   264 |     obj->Set(Nan::New<String>("cookie").ToLocalChecked(), Nan::New<Integer>(event->cookie));

   npm ERR!       |                                                                                           ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’

   npm ERR!  3926 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’

   npm ERR!  3929 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! ../src/bindings.cc:267:104: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::String>)’

   npm ERR!   267 |      obj->Set(Nan::New<String>("name").ToLocalChecked(), Nan::New<String>(event->name).ToLocalChecked());

   npm ERR!       |                                                                                                        ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’

   npm ERR!  3926 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3926:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’

   npm ERR!  3929 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,

   npm ERR!       |                                     ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3929:37: note:   candidate expects 3 arguments, 2 provided

   npm ERR! ../src/bindings.cc:275:66: error: no matching function for call to ‘v8::Object::Get(Nan::imp::IntegerFactory<v8::Integer>::return_t)’

   npm ERR!   275 |     Local<Value> value = handle->Get(Nan::New<Integer>(event->wd));

   npm ERR!       |                                                                  ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’

   npm ERR!  3973 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3973:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’

   npm ERR!  3976 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

   npm ERR!       |                                           ^~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3976:43: note:   candidate expects 2 arguments, 1 provided

   npm ERR! ../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]

   npm ERR!   279 |     callback.Call(handle, 1, argv);

   npm ERR!       |                                  ^

   npm ERR! In file included from ../src/node_inotify.h:14,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! ../../nan/nan.h:1720:3: note: declared here

   npm ERR!  1720 |   Call(v8::Local<v8::Object> target

   npm ERR!       |   ^~~~

   npm ERR! ../src/bindings.cc:285:34: error: no matching function for call to ‘v8::Value::ToString()’

   npm ERR!   285 |      handle->Delete(wd->ToString());

   npm ERR!       |                                  ^

   npm ERR! In file included from /app/.cache/node-gyp/16.2.0/include/node/node.h:63,

   npm ERR!                  from ../src/node_inotify.h:5,

   npm ERR!                  from ../src/bindings.h:4,

   npm ERR!                  from ../src/bindings.cc:2:

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’

   npm ERR!  3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(

   npm ERR!       |                                            ^~~~~~~~

   npm ERR! /app/.cache/node-gyp/16.2.0/include/node/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided

   npm ERR! make: *** [inotify.target.mk:114: Release/obj.target/inotify/src/bindings.o] Error 1

   npm ERR! gyp ERR! build error 

   npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2

   npm ERR! gyp ERR! stack     at ChildProcess.onExit (/tmp/build_28367a71/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)

   npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:365:28)

   npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

   npm ERR! gyp ERR! System Linux 4.4.0-1088-aws

   npm ERR! gyp ERR! command "/tmp/build_28367a71/.heroku/node/bin/node" "/tmp/build_28367a71/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

   npm ERR! gyp ERR! cwd /tmp/build_28367a71/node_modules/inotify

   npm ERR! gyp ERR! node -v v16.2.0

   npm ERR! gyp ERR! node-gyp -v v7.1.2

   npm ERR! gyp ERR! not ok

   

   npm ERR! A complete log of this run can be found in:

   npm ERR!     /tmp/npmcache.nFH3f/_logs/2021-06-06T18_08_52_077Z-debug.log
 

——> Сбой сборки

    We're sorry this build is failing! You can troubleshoot common issues here:

   https://devcenter.heroku.com/articles/troubleshooting-node-deploys

   

   Some possible problems:

   

   - node_modules checked into source control

     https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits

   

   Love,

   Heroku

   
 

! Push отклонен, не удалось скомпилировать Node.js приложение.

! Толчок не удался