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

sugarizer v1.1.0 + sugarizer-server dev branch on Node.js 10.x [FAILURE to reach MongoDB] #1430

Merged
merged 91 commits into from Feb 3, 2019

Conversation

holta
Copy link
Member

@holta holta commented Jan 29, 2019

To incorporate @llaske's latest fixes (for Node.js 10.x LTS especially) from:
https://github.com/llaske/sugarizer
https://github.com/llaske/sugarizer-server

Refs:
#974 "Sugarizer 1.0.1+ Release Polish"
#1411 "Simplify node-js installation from nodesource and a variable for version"
#1415 "Sugarizer should fail the install if nodejs version is incorrect"
#1424 (comment) "Sugarizer 1.0.1 -> 1.1.0"
#1429 "Validate Sugarizer Server 1.1.0 on release in/around March 2019"

@holta holta added this to the 6.7 milestone Jan 29, 2019
@holta
Copy link
Member Author

holta commented Jan 29, 2019

e.g. during testing, this PR installed Node.js 10.x including npm 6.4.1 on Ubuntu Server 18.04:

root@u18-server:~# nodejs --version
v10.15.0

root@u18-server:~# npm --version
6.4.1

@holta
Copy link
Member Author

holta commented Jan 29, 2019

@llaske & @m-anish:

I'm unable to get Sugarizer to work on Node.js 10.x — the error (when I run npm install --allow-root --unsafe-perm=true on Ubuntu Server 18.04) is pasted below. This shows the details underlying IIAB's automatic run of the same command shown at a higher level (by Ansible) at: https://pastebin.com/uGAqMCE1

Here is someone with apparently the same issue: laverdet/node-fibers#379 ?
However their suggestion to upgrade fibers from 1.0.15 did not solve this, when I ran npm install fibers which installed fibers 3.1.1 :-(

root@u18-server:/opt/iiab/sugarizer-server# npm install --allow-root --unsafe-perm=true

> fibers@1.0.15 install /opt/iiab/sugarizer-server-master/node_modules/synchronize/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory '/opt/iiab/sugarizer-server-master/node_modules/synchronize/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);
                                                                ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2802:51: note: candidate: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^~~~~~~~~~~~~~
/root/.node-gyp/10.15.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);
                                                                ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2802:51: note: candidate: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^~~~~~~~~~~~~~
/root/.node-gyp/10.15.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: Use Isolate version [-Wdeprecated-declarations]
      String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                                   ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.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 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])’
 Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                       ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.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]
 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;
              ^~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:8536:12: note: candidate: v8::TryCatch::TryCatch(v8::Isolate*)
   explicit TryCatch(Isolate* isolate);
            ^~~~~~~~
/root/.node-gyp/10.15.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: Use maybe version [-Wdeprecated-declarations]
     Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                                                  ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:1256:38: note: declared here
                        Local<Script> Compile(Local<String> source,
                                      ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/fibers.cc:643:66: warning: ‘v8::Local<v8::Value> v8::TryCatch::StackTrace() const’ is deprecated: Use maybe version. [-Wdeprecated-declarations]
       uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                                                  ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:8593:52: note: declared here
   V8_DEPRECATED("Use maybe version.", Local<Value> StackTrace() const);
                                                    ^
/root/.node-gyp/10.15.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::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();
                                           ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2425:44: note: candidate: v8::MaybeLocal<v8::Number> v8::Value::ToNumber(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                            ^~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:2425:44: note:   candidate expects 1 argument, 0 provided
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2442:31: note: candidate: v8::Local<v8::Number> v8::Value::ToNumber(v8::Isolate*) const
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:2442:31: note:   candidate expects 1 argument, 0 provided
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/root/.node-gyp/10.15.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);
                                                                        ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.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&))’
 tAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                              ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.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&))’
 >SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                              ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
fibers.target.mk:108: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make: Leaving directory '/opt/iiab/sugarizer-server-master/node_modules/synchronize/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.15.0-44-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 /opt/iiab/sugarizer-server-master/node_modules/synchronize/node_modules/fibers
gyp ERR! node -v v10.15.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++`
make: Entering directory '/opt/iiab/sugarizer-server-master/node_modules/synchronize/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);
                                                                ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2802:51: note: candidate: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^~~~~~~~~~~~~~
/root/.node-gyp/10.15.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);
                                                                ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2802:51: note: candidate: static v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::NewStringType, int)
   static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
                                                   ^~~~~~~~~~~~~~
/root/.node-gyp/10.15.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: Use Isolate version [-Wdeprecated-declarations]
      String::Utf8Value stack(uni::Deref(that.isolate, fatal_stack));
                                                                   ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.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 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])’
 Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                       ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.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]
 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;
              ^~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:8536:12: note: candidate: v8::TryCatch::TryCatch(v8::Isolate*)
   explicit TryCatch(Isolate* isolate);
            ^~~~~~~~
/root/.node-gyp/10.15.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: Use maybe version [-Wdeprecated-declarations]
     Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
                                                                  ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:1256:38: note: declared here
                        Local<Script> Compile(Local<String> source,
                                      ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/fibers.cc:643:66: warning: ‘v8::Local<v8::Value> v8::TryCatch::StackTrace() const’ is deprecated: Use maybe version. [-Wdeprecated-declarations]
       uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                                                  ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:8593:52: note: declared here
   V8_DEPRECATED("Use maybe version.", Local<Value> StackTrace() const);
                                                    ^
/root/.node-gyp/10.15.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::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();
                                           ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2425:44: note: candidate: v8::MaybeLocal<v8::Number> v8::Value::ToNumber(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
                                            ^~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:2425:44: note:   candidate expects 1 argument, 0 provided
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2442:31: note: candidate: v8::Local<v8::Number> v8::Value::ToNumber(v8::Isolate*) const
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:2442:31: note:   candidate expects 1 argument, 0 provided
                 Local<Number> ToNumber(Isolate* isolate) const);
                               ^
/root/.node-gyp/10.15.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);
                                                                        ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.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&))’
 tAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                              ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.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&))’
 >SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                              ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note: candidate: 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(
                                     ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3348:37: note:   candidate expects 8 arguments, 2 provided
fibers.target.mk:108: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make: Leaving directory '/opt/iiab/sugarizer-server-master/node_modules/synchronize/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.15.0-44-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 /opt/iiab/sugarizer-server-master/node_modules/synchronize/node_modules/fibers
gyp ERR! node -v v10.15.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++`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers@1.0.15 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers@1.0.15 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-01-29T19_42_17_798Z-debug.log

@llaske
Copy link

llaske commented Jan 29, 2019

Fibers is no longer used. It look like you're not using the dev branch.
Could you check the version in the package.json?
If you started from an existing install, remove content of node_modules directory to avoid conflict with old modules.

@holta
Copy link
Member Author

holta commented Jan 29, 2019

Fibers is no longer used. It look like you're not using the dev branch.

Oops I thought you meant the master branch. I'll try again with the dev branch.

Aside: when do you expect this will be merged into sugarizer-server's master branch?

Could you check the version in the package.json?

root@u18-server:/opt/iiab/sugarizer-server# more package.json
{
        "name": "sugarizer-server",
        "description": "Sugarizer Server",
        "version": "1.0.1",
        "repository": "https://github.com/llaske/sugarizer-server",
        "license": "Apache-2.0",
        "dependencies": {
                "cors": "2.8.x",
                "ejs": "~>2.5.5",
                "express": "3.x",
                "express-flash": "~0.0.2",
                "express-validator": "~1.0.1",
                "fibers": "^3.1.1",
                "http": "0.0.x",
                "ini": "1.1.x",
                "jwt-simple": "^0.2.0",
                "moment": "2.19.3",
                "mongodb": "2.x.x",
                "nodemon": "^1.11.0",
                "request": "*",
                "synchronize": "*",
                "websocket": "1.0.x"
        },
        "devDependencies": {
                "chai": "*",
                "chai-http": "*",
                "mocha": "*"
        },
        "scripts": {
                "test": "mocha api/test/",
                "docs": "apidoc -i api/controller -i dashboard/helper -o docs/ww
w/",
                "start": "node sugarizer.js"
        }
}

If you started from an existing install, remove content of node_modules directory to avoid conflict with old modules.

This was not an existing install FWIW.

@holta holta changed the title Sugarizer & sugarizer-server master (both) on Node.js 10.x sugarizer master branch & sugarizer-server dev branch on Node.js 10.x Jan 29, 2019
@holta
Copy link
Member Author

holta commented Jan 29, 2019

e.g. during testing, this PR installed Node.js 10.x including npm 6.4.1 on Ubuntu Server 18.04:

root@u18-server:~# nodejs --version
v10.15.0

FYI today there just happened to be an apt upgrade to:

root@box:~# nodejs --version
v10.15.1

(Which includes the original/unchanged npm 6.4.1)

@holta holta merged commit d1f59a0 into iiab:master Feb 3, 2019
@holta
Copy link
Member Author

holta commented Feb 3, 2019

In conclusion, here are the 2-3 primary fixes that allowed this to come together:

  1. https://github.com/iiab/iiab/blob/master/roles/mongodb/tasks/main.yml#L13-L21 pasted in here:
# 2019-02-02: Sugarizer with Node.js 10.x requires MongoDB 2.6+ so
# https://andyfelong.com/2017/08/mongodb-3-0-14-for-raspbian-stretch/
# is being used on RPi, all I found! (Raspbian's apt pkg is MongoDB 2.4.14)
#
# mongodb_stretch_3_0_14_core.zip (20M) & mongodb_stretch_3_0_14_tools.zip (15M)
# were backed up from andyfelong.com to http://download.iiab.io/packages/
#
# CLARIF: mongodb_stretch_3_0_14_core.zip IS IN FACT 3.0.14 (core) BUT...
#         mongodb_stretch_3_0_14_tools.zip IS REALLY 3.0.15 (tools)
  1. https://github.com/iiab/iiab/blob/master/roles/sugarizer/tasks/main.yml#L173-L188 pasted in here:
# 2019-02-02 No Longer Required thanks to @llaske's upstream fix:
# https://github.com/llaske/sugarizer-server/commit/46c4822bc7801ff8d621c22988aa4418359e7e19
## 2019-02-02: HACK WAS REQUIRED ON UBUNTU 18.04 so Sugarizer finds MongoDB
## after 1st reboot.  Otherwise "Waiting for DB..." appears every second as
## shown by "systemctl status sugarizer" and "journalctl -eu sugarizer".
## This does NOT affect Ubuntu 16.04 or Raspbian.  @jvonau wonders if U18.04's
## "nameserver 127.0.0.53" in /etc/resolv.conf is to blame?  @m-anish wondered
## if "bind_ip: 127.0.0.1" in /etc/mongod.conf was to blame as suggested by
## https://stackoverflow.com/questions/8904991/mongodb-cant-connect-to-localhost-but-can-connect-to-localhosts-ip-address
## But changing to "bind_ip: localhost" does not work with Sugarizer, and
## "bind_ip: 127.0.0.1,localhost" is not allowed.  BACKGROUND: PR #1430
#- name: Set MongoDB "server" from localhost to 127.0.0.1 in /opt/iiab/sugarizer-server/env/sugarizer.ini
#  lineinfile:
#    path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
#    regexp: "^server = localhost$"
#    line: "server = 127.0.0.1"
  1. https://github.com/iiab/iiab/blob/master/roles/sugarizer/tasks/main.yml#L162-L215 excerpted here:
# 3 [WAS 4] STANZAS ADDED BELOW JAN/FEB 2019, HOPING THIS MIGHT "JUST WORK"
# WITH FUTURE UPGRADES BEYOND SUGARIZER 1.1?!
#
# SOME BACKGROUND -- WHY WE'RE AUTO-EDITING sugarizer-server'S CONFIG FILES:
# http://github.com/iiab/iiab/pull/1430#issuecomment-459129378
[...]

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

Successfully merging this pull request may close these issues.

None yet

3 participants