Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install via npm #1663

Closed
BlockChainCaffe opened this issue Jan 25, 2023 · 1 comment
Closed

Can't install via npm #1663

BlockChainCaffe opened this issue Jan 25, 2023 · 1 comment
Labels

Comments

@BlockChainCaffe
Copy link

BlockChainCaffe commented Jan 25, 2023

Describe the bug

I'm trying to install via

npm install --save stripe

and get lots and lots of errors from gyp

Here the errors:

452 error command sh -c node-gyp rebuild
453 error make: Entering directory '/home/emcy/Dev/FaunaLife/Api_Shop/node_modules/websocket/build'
453 error   CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
453 error make: Leaving directory '/home/emcy/Dev/FaunaLife/Api_Shop/node_modules/websocket/build'
454 error gyp info it worked if it ends with ok
454 error gyp info using node-gyp@8.2.0
454 error gyp info using node@16.13.0 | linux | x64
454 error gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
454 error gyp info spawn /usr/bin/python3
454 error gyp info spawn args [
454 error gyp info spawn args   '/home/emcy/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
454 error gyp info spawn args   'binding.gyp',
454 error gyp info spawn args   '-f',
454 error gyp info spawn args   'make',
454 error gyp info spawn args   '-I',
454 error gyp info spawn args   '/home/emcy/Dev/FaunaLife/Api_Shop/node_modules/websocket/build/config.gypi',
454 error gyp info spawn args   '-I',
454 error gyp info spawn args   '/home/emcy/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
454 error gyp info spawn args   '-I',
454 error gyp info spawn args   '/home/emcy/.cache/node-gyp/16.13.0/include/node/common.gypi',
454 error gyp info spawn args   '-Dlibrary=shared_library',
454 error gyp info spawn args   '-Dvisibility=default',
454 error gyp info spawn args   '-Dnode_root_dir=/home/emcy/.cache/node-gyp/16.13.0',
454 error gyp info spawn args   '-Dnode_gyp_dir=/home/emcy/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp',
454 error gyp info spawn args   '-Dnode_lib_file=/home/emcy/.cache/node-gyp/16.13.0/<(target_arch)/node.lib',
454 error gyp info spawn args   '-Dmodule_root_dir=/home/emcy/Dev/FaunaLife/Api_Shop/node_modules/websocket',
454 error gyp info spawn args   '-Dnode_engine=v8',
454 error gyp info spawn args   '--depth=.',
454 error gyp info spawn args   '--no-parallel',
454 error gyp info spawn args   '--generator-output',
454 error gyp info spawn args   'build',
454 error gyp info spawn args   '-Goutput_dir=.'
454 error gyp info spawn args ]
454 error gyp info spawn make
454 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
454 error In file included from ../src/bufferutil.cc:17:
454 error ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
454 error ../../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]
454 error  2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
454 error       |                                                              ^
454 error ../src/bufferutil.cc: At global scope:
454 error ../src/bufferutil.cc:26:30: error: ‘v8::Handle’ has not been declared
454 error    26 |   static void Initialize(v8::Handle<v8::Object> target)
454 error       |                              ^~~~~~
454 error ../src/bufferutil.cc:26:36: error: expected ‘,’ or ‘...’ before ‘<’ token
454 error    26 |   static void Initialize(v8::Handle<v8::Object> target)
454 error       |                                    ^
454 error ../src/bufferutil.cc: In static member function ‘static void BufferUtil::Initialize(int)’:
454 error ../src/bufferutil.cc:34:14: error: ‘target’ was not declared in this scope
454 error    34 |     Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
454 error       |              ^~~~~~
454 error ../src/bufferutil.cc:34:86: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
454 error    34 |     Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
454 error       |                                                                                      ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
454 error  6802 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
454 error       |                                              ^~~~~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:6802:46: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Merge(Nan::NAN_METHOD_ARGS_TYPE)’:
454 error ../src/bufferutil.cc:50:49: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    50 |     Local<Object> bufferObj = info[0]->ToObject();
454 error       |                                                 ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:57:39: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
454 error    57 |       Local<Object> src = array->Get(i)->ToObject();
454 error       |                                       ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
454 error  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
454 error       |                                           ^~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
454 error  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
454 error       |                                           ^~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
454 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Unmask(Nan::NAN_METHOD_ARGS_TYPE)’:
454 error ../src/bufferutil.cc:68:50: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    68 |     Local<Object> buffer_obj = info[0]->ToObject();
454 error       |                                                  ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:70:48: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    70 |     Local<Object> mask_obj = info[1]->ToObject();
454 error       |                                                ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Mask(Nan::NAN_METHOD_ARGS_TYPE)’:
454 error ../src/bufferutil.cc:89:50: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    89 |     Local<Object> buffer_obj = info[0]->ToObject();
454 error       |                                                  ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:90:48: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    90 |     Local<Object> mask_obj = info[1]->ToObject();
454 error       |                                                ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:92:50: error: no matching function for call to ‘v8::Value::ToObject()’
454 error    92 |     Local<Object> output_obj = info[2]->ToObject();
454 error       |                                                  ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
454 error  3060 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
454 error       |                                            ^~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:93:51: error: no matching function for call to ‘v8::Value::Int32Value()’
454 error    93 |     unsigned int dataOffset = info[3]->Int32Value();
454 error       |                                                   ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
454 error  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
454 error       |                                        ^~~~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc:94:47: error: no matching function for call to ‘v8::Value::Int32Value()’
454 error    94 |     unsigned int length = info[4]->Int32Value();
454 error       |                                               ^
454 error In file included from ../src/bufferutil.cc:8:
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
454 error  3107 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
454 error       |                                        ^~~~~~~~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
454 error ../src/bufferutil.cc: At global scope:
454 error ../src/bufferutil.cc:115:12: error: variable or field ‘init’ declared void
454 error   115 | void init (Handle<Object> target)
454 error       |            ^~~~~~
454 error ../src/bufferutil.cc:115:12: error: ‘Handle’ was not declared in this scope
454 error ../src/bufferutil.cc:115:25: error: expected primary-expression before ‘>’ token
454 error   115 | void init (Handle<Object> target)
454 error       |                         ^
454 error ../src/bufferutil.cc:115:27: error: ‘target’ was not declared in this scope
454 error   115 | void init (Handle<Object> target)
454 error       |                           ^~~~~~
454 error In file included from ../src/bufferutil.cc:9:
454 error ../src/bufferutil.cc:121:25: error: ‘init’ was not declared in this scope; did you mean ‘int’?
454 error   121 | NODE_MODULE(bufferutil, init)
454 error       |                         ^~~~
454 error /home/emcy/.cache/node-gyp/16.13.0/include/node/node.h:821:36: note: in definition of macro ‘NODE_MODULE_X’
454 error   821 |       (node::addon_register_func) (regfunc),                          \
454 error       |                                    ^~~~~~~
454 error ../src/bufferutil.cc:121:1: note: in expansion of macro ‘NODE_MODULE’
454 error   121 | NODE_MODULE(bufferutil, init)
454 error       | ^~~~~~~~~~~
454 error make: *** [bufferutil.target.mk:114: Release/obj.target/bufferutil/src/bufferutil.o] Error 1
454 error gyp ERR! build error
454 error gyp ERR! stack Error: `make` failed with exit code: 2
454 error gyp ERR! stack     at ChildProcess.onExit (/home/emcy/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
454 error gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
454 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
454 error gyp ERR! System Linux 5.14.0-1054-oem
454 error gyp ERR! command "/home/emcy/.nvm/versions/node/v16.13.0/bin/node" "/home/emcy/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
454 error gyp ERR! cwd /home/emcy/Dev/FaunaLife/Api_Shop/node_modules/websocket
454 error gyp ERR! node -v v16.13.0
454 error gyp ERR! node-gyp -v v8.2.0
454 error gyp ERR! not ok
455 verbose exit 1

To Reproduce

npm install --save stripe

Expected behavior

Install with no errors

Code snippets

No response

OS

Linux Ubuntu/Mint

Node version

18.4.0

Library version

stripe@11.7.0

API version

stripe@11.7.0

Additional context

No response

@BlockChainCaffe
Copy link
Author

My bad, error was somewhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant