Skip to content

Install time fails with nodejs version 12.21.0 #116

@cesarjorgemartinez

Description

@cesarjorgemartinez

Hi,

I use node versión 12.21.0 (CentOS 7.9, gcc 4.8.5-44) and when I do npm install time show:

Howto fix it?

Regards

  CXX(target) Release/obj.target/time/src/time.o
../src/time.cc:12:20: error: ‘Handle’ no se ha declarado
   static void Init(Handle<Object> target) {
                    ^
../src/time.cc:12:26: error: expected ‘,’ or ‘...’ before ‘<’ token
   static void Init(Handle<Object> target) {
                          ^
../src/time.cc: En la función miembro static ‘static void Time::Init(int)’:
../src/time.cc:16:20: error: ‘target’ no se declaró en este ámbito
     Nan::SetMethod(target, "time", Time_);
                    ^
../src/time.cc: En la función miembro static ‘static Nan::NAN_METHOD_RETURN_TYPE Time::Localtime(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/time.cc:87:64: error: no se encontró una función coincidente para la llamada a ‘v8::Value::IntegerValue()’
     time_t rawtime = static_cast<time_t>(info[0]->IntegerValue());
                                                                ^
../src/time.cc:87:64: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2705:40: nota: v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2705:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc: En la función miembro static ‘static Nan::NAN_METHOD_RETURN_TYPE Time::Mktime(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/time.cc:141:103: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_sec   = Nan::Get(arg, Nan::New("seconds").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                       ^
../src/time.cc:141:103: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:142:103: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_min   = Nan::Get(arg, Nan::New("minutes").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                       ^
../src/time.cc:142:103: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:143:101: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_hour  = Nan::Get(arg, Nan::New("hours").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                     ^
../src/time.cc:143:101: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:144:106: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_mday  = Nan::Get(arg, Nan::New("dayOfMonth").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                          ^
../src/time.cc:144:106: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:145:101: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_mon   = Nan::Get(arg, Nan::New("month").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                     ^
../src/time.cc:145:101: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:146:100: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_year  = Nan::Get(arg, Nan::New("year").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                    ^
../src/time.cc:146:100: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc:147:113: error: no se encontró una función coincidente para la llamada a ‘v8::Value::Int32Value()’
     tmstr.tm_isdst = Nan::Get(arg, Nan::New("isDaylightSavings").ToLocalChecked()).ToLocalChecked()->Int32Value();
                                                                                                                 ^
../src/time.cc:147:113: nota: el candidato es:
In file included from /home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:67:0,
                 from ../../nan/nan.h:56,
                 from ../src/time.cc:5:
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/v8.h:2709:40: nota:   el candidato espera 1 argumento, se proporcionaron 0
../src/time.cc: En el ámbito global:
../src/time.cc:156:21: error: se declaró la variable o campo ‘init’ como void
   static void init (Handle<Object> target) {
                     ^
../src/time.cc:156:21: error: ‘Handle’ no se declaró en este ámbito
../src/time.cc:156:34: error: expected primary-expression before ‘>’ token
   static void init (Handle<Object> target) {
                                  ^
../src/time.cc:156:36: error: ‘target’ no se declaró en este ámbito
   static void init (Handle<Object> target) {
                                    ^
In file included from ../../nan/nan.h:56:0,
                 from ../src/time.cc:5:
../src/time.cc:159:21: error: ‘init’ no se declaró en este ámbito
   NODE_MODULE(time, init)
                     ^
/home/jenkins/.cache/node-gyp/12.21.0/include/node/node.h:737:36: nota: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^
../src/time.cc:159:3: nota: in expansion of macro ‘NODE_MODULE’
   NODE_MODULE(time, init)
   ^
make: *** [Release/obj.target/time/src/time.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions