thlorenz / active-handles

Prints out information about the process's active handles, including function source and location
MIT License
57 stars 6 forks source link

(nodejs >= 12) npm install fails because function-origin fails #2

Open Skywalker13 opened 4 years ago

Skywalker13 commented 4 years ago

Hi

See https://github.com/vkurchatkin/function-origin/issues/9

OmgImAlexis commented 4 years ago

Here's the full error(in English), hopefully this helps.


root@Devon:/usr/local/node/graphql-api# npm i active-handles

> libvirt@1.2.1 install /usr/local/node/graphql-api/node_modules/libvirt
> node-gyp rebuild

Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
gyp: Call to 'pkg-config --libs libvirt' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.3.8-Unraid
gyp ERR! command "/usr/bin/node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/node/graphql-api/node_modules/libvirt
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> function-origin@1.1.1 install /usr/local/node/graphql-api/node_modules/function-origin
> node-gyp rebuild

make: Entering directory '/usr/local/node/graphql-api/node_modules/function-origin/build'
  CXX(target) Release/obj.target/function_origin/src/function_origin.o
In file included from ../src/function_origin.cc:2:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298: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/function_origin.cc:1:
../src/function_origin.cc: At global scope:
/root/.node-gyp/10.16.3/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Handle<v8::Object>)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.node-gyp/10.16.3/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/function_origin.cc:27:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(function_origin, Init)
 ^~~~~~~~~~~
In file included from /root/.node-gyp/10.16.3/include/node/node.h:63,
                 from ../src/function_origin.cc:1:
/root/.node-gyp/10.16.3/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>&)]’:
/root/.node-gyp/10.16.3/include/node/node_object_wrap.h:84:78:   required from here
/root/.node-gyp/10.16.3/include/node/v8.h:9502: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);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/10.16.3/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
/root/.node-gyp/10.16.3/include/node/v8.h:9502: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]
  SOLINK_MODULE(target) Release/obj.target/function_origin.node
/usr/bin/ld: cannot find /usr/lib64/libmvec_nonshared.a
collect2: error: ld returned 1 exit status
make: *** [function_origin.target.mk:129: Release/obj.target/function_origin.node] Error 1
make: Leaving directory '/usr/local/node/graphql-api/node_modules/function-origin/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.3.8-Unraid
gyp ERR! command "/usr/bin/node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/node/graphql-api/node_modules/function-origin
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN graphql-directive@0.2.1 requires a peer of graphql@^0.11.0 || ^0.12.0 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-tools@2.24.0 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-toolkit@0.5.0 requires a peer of graphql-tag-pluck@^0.8.3 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-type-long@0.1.1 requires a peer of graphql@^0.9.1 || ^0.10.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: libvirt@1.2.1 (node_modules/libvirt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: libvirt@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! function-origin@1.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the function-origin@1.1.1 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!     /root/.npm/_logs/2019-11-07T02_54_55_023Z-debug.log
``
jwulf commented 4 years ago

I created a PR for function-origin, and published a patched package @sitapati/active-handles

evil-shrike commented 6 months ago

hi @jwulf, @sitepati/active-handles also failed on installing:

npm ERR! In file included from ../src/function_origin.cc:2:
npm ERR! ../../../nan/nan.h:688:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence t
he GC schedule. [-Wdeprecated-declarations]
npm ERR!     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
npm ERR!                                       ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-isolate.h:1291:3: note: 'IdleNotificationDeadline' has been explic
itly marked deprecated here
npm ERR!   V8_DEPRECATE_SOON(
npm ERR!   ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8config.h:550:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR!                                       ^
npm ERR! ../src/function_origin.cc:31:11: error: no matching member function for call to 'Set'
npm ERR!   target->Set(Nan::New<String>("file").ToLocalChecked(), origin.ResourceName());
npm ERR!   ~~~~~~~~^~~
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:246:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:249:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/function_origin.cc:33:11: error: no matching member function for call to 'Set'
npm ERR!   target->Set(Nan::New<String>("line").ToLocalChecked(),
npm ERR!   ~~~~~~~~^~~
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:246:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:249:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/function_origin.cc:36:11: error: no matching member function for call to 'Set'
npm ERR!   target->Set(Nan::New<String>("column").ToLocalChecked(),
npm ERR!   ~~~~~~~~^~~
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:246:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:249:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/function_origin.cc:39:11: error: no matching member function for call to 'Set'
npm ERR!   target->Set(Nan::New<String>("inferredName").ToLocalChecked(), fn->GetInferredName());
npm ERR!   ~~~~~~~~^~~
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:246:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:249:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/function_origin.cc:44:45: error: no member named 'CreationContext' in 'v8::Object'
npm ERR!   v8::Local<v8::Context> context = exports->CreationContext();
npm ERR!                                    ~~~~~~~~~^
npm ERR! ../src/function_origin.cc:45:12: error: no matching member function for call to 'Set'
npm ERR!   exports->Set(Nan::New<String>("SetOrigin").ToLocalChecked(),
npm ERR!   ~~~~~~~~~^~~
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:246:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/segy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:249:37: note: candidate function not viable: requires 3 a
rguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! 1 warning and 6 errors generated.
npm ERR! make: *** [Release/obj.target/function_origin/src/function_origin.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 (/opt/homebrew/Cellar/node@20/20.9.0/lib/node_modules/npm/node_modules/node-gyp/lib
/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Darwin 23.3.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node@20/20.9.0/bin/node" "/opt/homebrew/Cellar/node@20/20.9.0/lib/node_modules/npm/nod
e_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/segy/work/gaarf/ads-api-fetcher/js/node_modules/@sitapati/function-origin
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok