node-gyp fails to install with yarn

Created on 12 Oct 2018  Â·  4Comments  Â·  Source: nodejs/node-gyp

in a managed linux environment, node-gyp 3.8.0 fails to install with node 10.12.0. we're using yarn install --force which previously (on node 8.12.0) forced a rebuild of fibers which seemed to fix the node-gyp issue.

g++ and build-essentials are up to date. and i'm not sure what else to look into to resolve the issue:

#!/bin/bash -eo pipefail
make install
yarn install v1.10.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "redux@^3.0.0".
warning " > [email protected]" has incorrect peer dependency "redux@^3.0.0".
warning " > [email protected]" has incorrect peer dependency "redux@^2.0.0 || ^3.0.0".
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/addons@^3.3.0".
warning " > @storybook/[email protected]" has incorrect peer dependency "babel-core@^6.26.0 || ^7.0.0-0".
warning " > @storybook/[email protected]" has unmet peer dependency "babel-runtime@>=6.0.0".
warning " > [email protected]" has incorrect peer dependency "chai@>= 2.1.2 < 4".
warning " > [email protected]" has incorrect peer dependency "chai@>= 2.0.0 < 4".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.4.2".
[5/5] Rebuilding all packages...
error /home/circleci/project/node_modules/fibers: Command failed.
Exit code: 1
Command: node build.js || nodejs build.js
Arguments: 
Directory: /home/circleci/project/node_modules/fibers
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp http GET https://nodejs.org/dist/v10.12.0/node-v10.12.0-headers.tar.gz
gyp http 200 https://nodejs.org/dist/v10.12.0/node-v10.12.0-headers.tar.gz
gyp http GET https://nodejs.org/dist/v10.12.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/dist/v10.12.0/SHASUMS256.txt
gyp info spawn /opt/circleci/.pyenv/shims/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/circleci/project/node_modules/fibers/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/circleci/.node-gyp/10.12.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/circleci/.node-gyp/10.12.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/circleci/.node-gyp/10.12.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/circleci/project/node_modules/fibers',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make[1]: Entering directory `/home/circleci/project/node_modules/fibers/build'
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:122:64: error: no matching function for call to ‘v8::String::NewFromOneByte(v8::Isolate*&, const uint8_t*)’
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc:122:64: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note:   candidate expects 4 arguments, 2 provided
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:126:64: error: no matching function for call to ‘v8::String::NewFromOneByte(v8::Isolate*&, const uint8_t*)’
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc:126:64: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note:   candidate expects 4 arguments, 2 provided
../src/fibers.cc: In static member function ‘static void Fiber::DestroyOrphans()’:
../src/fibers.cc:406:67: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:2891): Use Isolate version [-Wdeprecated-declarations]
      String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                                   ^
../src/fibers.cc: In static member function ‘static uni::FunctionType Fiber::New(const Arguments&)’:
../src/fibers.cc:433:99: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Handle<v8::Value> [1])’
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                   ^
../src/fibers.cc:433:99: note: candidates are:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3993:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3996:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/fibers.cc:433:106: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                          ^
../src/fibers.cc: In static member function ‘static void Fiber::RunFiber(void**)’:
../src/fibers.cc:621:14: error: no matching function for call to ‘v8::TryCatch::TryCatch()’
     TryCatch try_catch;
              ^
../src/fibers.cc:621:14: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:8536:12: note: v8::TryCatch::TryCatch(v8::Isolate*)
   explicit TryCatch(Isolate* isolate);
            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:8536:12: note:   candidate expects 1 argument, 0 provided
../src/fibers.cc:628:66: warning: ‘static v8::Local<v8::Script> v8::Script::Compile(v8::Local<v8::String>, v8::ScriptOrigin*)’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:1255): Use maybe version [-Wdeprecated-declarations]
     Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                                                  ^
../src/fibers.cc:643:66: warning: ‘v8::Local<v8::Value> v8::TryCatch::StackTrace() const’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:8593): Use maybe version. [-Wdeprecated-declarations]
       uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                                                  ^
../src/fibers.cc: In static member function ‘static void Fiber::SetPoolSize(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&)’:
../src/fibers.cc:741:43: error: no matching function for call to ‘v8::Value::ToNumber()’
    Coroutine::pool_size = value->ToNumber()->Value();
                                           ^
../src/fibers.cc:741:43: note: candidates are:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2425:44: note: v8::MaybeLocal<v8::Number> v8::Value::ToNumber(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2425:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/circleci/.node-gyp/10.12.0/include/node/v8.h:26:0,
                 from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2442:31: note: v8::Local<v8::Number> v8::Value::ToNumber(v8::Isolate*) const
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/home/circleci/.node-gyp/10.12.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2442:31: note:   candidate expects 1 argument, 0 provided
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/home/circleci/.node-gyp/10.12.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^
../src/fibers.cc: In static member function ‘static void Fiber::Init(v8::Handle<v8::Object>)’:
../src/fibers.cc:793:72: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
                                                                        ^
../src/fibers.cc:793:72: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
../src/fibers.cc:794:87: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&), void (&)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                                       ^
../src/fibers.cc:794:87: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   no known conversion for argument 2 from ‘uni::FunctionType(v8::Local<v8::String>, const GetterCallbackInfo&) {aka void(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)}’ to ‘v8::Local<v8::Name>’
../src/fibers.cc:795:84: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                                    ^
../src/fibers.cc:795:84: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:123:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:127:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
make[1]: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make[1]: Leaving directory `/home/circleci/project/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.4.0-96-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/circleci/project/node_modules/fibers
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn /opt/circleci/.pyenv/shims/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/circleci/project/node_modules/fibers/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/circleci/.node-gyp/10.12.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/circleci/.node-gyp/10.12.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/circleci/.node-gyp/10.12.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/circleci/project/node_modules/fibers',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Entering directory `/home/circleci/project/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:122:64: error: no matching function for call to ‘v8::String::NewFromOneByte(v8::Isolate*&, const uint8_t*)’
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc:122:64: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note:   candidate expects 4 arguments, 2 provided
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:126:64: error: no matching function for call to ‘v8::String::NewFromOneByte(v8::Isolate*&, const uint8_t*)’
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc:126:64: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2802:51: note:   candidate expects 4 arguments, 2 provided
../src/fibers.cc: In static member function ‘static void Fiber::DestroyOrphans()’:
../src/fibers.cc:406:67: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:2891): Use Isolate version [-Wdeprecated-declarations]
      String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                                   ^
../src/fibers.cc: In static member function ‘static uni::FunctionType Fiber::New(const Arguments&)’:
../src/fibers.cc:433:99: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Handle<v8::Value> [1])’
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                   ^
../src/fibers.cc:433:99: note: candidates are:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3993:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3996:44: note: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/fibers.cc:433:106: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                          ^
../src/fibers.cc: In static member function ‘static void Fiber::RunFiber(void**)’:
../src/fibers.cc:621:14: error: no matching function for call to ‘v8::TryCatch::TryCatch()’
     TryCatch try_catch;
              ^
../src/fibers.cc:621:14: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:8536:12: note: v8::TryCatch::TryCatch(v8::Isolate*)
   explicit TryCatch(Isolate* isolate);
            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:8536:12: note:   candidate expects 1 argument, 0 provided
../src/fibers.cc:628:66: warning: ‘static v8::Local<v8::Script> v8::Script::Compile(v8::Local<v8::String>, v8::ScriptOrigin*)’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:1255): Use maybe version [-Wdeprecated-declarations]
     Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                                                  ^
../src/fibers.cc:643:66: warning: ‘v8::Local<v8::Value> v8::TryCatch::StackTrace() const’ is deprecated (declared at /home/circleci/.node-gyp/10.12.0/include/node/v8.h:8593): Use maybe version. [-Wdeprecated-declarations]
       uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                                                  ^
../src/fibers.cc: In static member function ‘static void Fiber::SetPoolSize(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&)’:
../src/fibers.cc:741:43: error: no matching function for call to ‘v8::Value::ToNumber()’
    Coroutine::pool_size = value->ToNumber()->Value();
                                           ^
../src/fibers.cc:741:43: note: candidates are:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2425:44: note: v8::MaybeLocal<v8::Number> v8::Value::ToNumber(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                            ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2425:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/circleci/.node-gyp/10.12.0/include/node/v8.h:26:0,
                 from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2442:31: note: v8::Local<v8::Number> v8::Value::ToNumber(v8::Isolate*) const
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/home/circleci/.node-gyp/10.12.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:2442:31: note:   candidate expects 1 argument, 0 provided
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/home/circleci/.node-gyp/10.12.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^
../src/fibers.cc: In static member function ‘static void Fiber::Init(v8::Handle<v8::Object>)’:
../src/fibers.cc:793:72: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
                                                                        ^
../src/fibers.cc:793:72: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
../src/fibers.cc:794:87: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&), void (&)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                                       ^
../src/fibers.cc:794:87: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   no known conversion for argument 2 from ‘uni::FunctionType(v8::Local<v8::String>, const GetterCallbackInfo&) {aka void(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)}’ to ‘v8::Local<v8::Name>’
../src/fibers.cc:795:84: error: no matching function for call to ‘v8::Function::SetAccessor(v8::Handle<v8::String>, uni::FunctionType (&)(v8::Local<v8::String>, const GetterCallbackInfo&))’
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                                    ^
../src/fibers.cc:795:84: note: candidate is:
In file included from /home/circleci/.node-gyp/10.12.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/circleci/.node-gyp/10.12.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:123:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:127:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
make[1]: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make[1]: Leaving directory `/home/circleci/project/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.4.0-96-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/circleci/project/node_modules/fibers
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [install] Error 1
Exited with code 2

Most helpful comment

i'm sorry but i dont know what to delete. i'm very confused rn.

All 4 comments

so the issue is definitely legacy code (and piss poor support from npm for resolving dependency trees). after some manual searching, i think the issue is not caused by node-gyp, but definitely by [email protected].

and the causal chain is a huge pain in the ass. it goes [email protected] to [email protected] which then finally depends on [email protected] which seems to be (rightfully) unsupported in node 10.12.0.

i'm going to dig a little deeper into chain that caused the old fibers to be installed and see if that resolves it. if it does, then i'll close this.

incrementing to [email protected] caused wdio-sync to roll to 0.7.0 which then rolled fibers to 2.0.2 which unbroke the whole setup. node-gyp still complains, but installation is successful. (and the legacy non-regex cucumbers are still valid for wdio).

Thank you sooo much! I reinstalled Xcode command line tool, yarn, npm, node and always had the same issue. Removing those unused dependencies from my package.json fixed it :P

i'm sorry but i dont know what to delete. i'm very confused rn.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlchereau picture jlchereau  Â·  3Comments

swaj picture swaj  Â·  3Comments

adrianescat picture adrianescat  Â·  3Comments

good-idea picture good-idea  Â·  3Comments

jplatte picture jplatte  Â·  3Comments