"time" dependency not installable on MacOS with node 12

Issue #170 new
Hugo G created an issue

Getting a long error when trying to install dependencies. In particular the time module fails to build with node 12 on MacOS. Everything worked fine once I downgraded to node 10 using brew install node@10.

~/jira-wallboards (master|2) [130] $ atlasboard start --dashboard ninjas
Loading dashboards matching ninjas only

Starting server...
Installing dependencies...
npm WARN atlasboard-atlassian-package@0.0.2 No license field.

audited 430 packages in 0.922s
found 35 vulnerabilities (3 low, 27 moderate, 4 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> time@0.11.4 install /Users/hugo/jira-wallboards/packages/atlassian-internal/node_modules/time
> node-gyp rebuild

  CXX(target) Release/obj.target/time/src/time.o
../src/time.cc:12:20: error: no template named 'Handle'
  static void Init(Handle<Object> target) {
                   ^
../src/time.cc:65:64: error: too few arguments to function call, single argument 'context' was not specified
    time_t rawtime = static_cast<time_t>(info[0]->IntegerValue());
                                         ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2565:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:119:103: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_sec   = Nan::Get(arg, Nan::New("seconds").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:120:103: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_min   = Nan::Get(arg, Nan::New("minutes").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:121:101: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_hour  = Nan::Get(arg, Nan::New("hours").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:122:106: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_mday  = Nan::Get(arg, Nan::New("dayOfMonth").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:123:101: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_mon   = Nan::Get(arg, Nan::New("month").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:124:100: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_year  = Nan::Get(arg, Nan::New("year").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:125:113: error: too few arguments to function call, single argument 'context' was not specified
    tmstr.tm_isdst = Nan::Get(arg, Nan::New("isDaylightSavings").ToLocalChecked()).ToLocalChecked()->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/time.cc:134:15: error: variable has incomplete type 'void'
  static void init (Handle<Object> target) {
              ^
../src/time.cc:134:21: error: use of undeclared identifier 'Handle'
  static void init (Handle<Object> target) {
                    ^
../src/time.cc:134:28: error: 'Object' does not refer to a value
  static void init (Handle<Object> target) {
                           ^
/Users/hugo/.node-gyp/12.4.0/include/node/v8.h:3356:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/time.cc:134:36: error: use of undeclared identifier 'target'
  static void init (Handle<Object> target) {
                                   ^
../src/time.cc:134:43: error: expected ';' after top level declarator
  static void init (Handle<Object> target) {
                                          ^
                                          ;
14 errors generated.
make: *** [Release/obj.target/time/src/time.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/hugo/jira-wallboards/packages/atlassian-internal/node_modules/time
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! time@0.11.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the time@0.11.4 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!     /Users/hugo/.npm/_logs/2019-07-02T00_35_54_192Z-debug.log
  error installing /Users/hugo/jira-wallboards/packages/atlassian-internal

Comments (0)

  1. Log in to comment