Robotjs: Install on mac failed

Created on 13 May 2019  路  12Comments  路  Source: octalmage/robotjs

Current Behavior

> [email protected] install /Users/linonetwo/Desktop/repo/zazu/node_modules/robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.1.0 runtime=node arch=x64 platform=darwin)
  CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:63:39: error: too few arguments to function call, single argument 'context' was not specified
        const size_t x = info[0]->Int32Value();
                         ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:64:39: error: too few arguments to function call, single argument 'context' was not specified
        const size_t y = info[1]->Int32Value();
                         ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:97:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t x = info[0]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:98:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t y = info[1]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:114:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t x = info[0]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:115:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t y = info[1]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:143:39: error: no matching member function for call to 'ToString'
                v8::String::Utf8Value bstr(info[0]->ToString());
                                           ~~~~~~~~~^~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
                    Local<String> ToString(Isolate* isolate) const);
                                  ^
../src/robotjs.cc:159:22: error: no matching member function for call to 'BooleanValue'
                doubleC = info[1]->BooleanValue();
                          ~~~~~~~~~^~~~~~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2559:8: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
  bool BooleanValue(Isolate* isolate) const;
       ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2562:51: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
                V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                  ^
../src/robotjs.cc:239:35: error: too few arguments to function call, single argument 'context' was not specified
        mouseDelay = info[0]->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:251:30: error: too few arguments to function call, single argument 'context' was not specified
        int x = info[0]->Int32Value();
                ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:252:30: error: too few arguments to function call, single argument 'context' was not specified
        int y = info[1]->Int32Value();
                ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:418:44: error: expected '(' for function-style cast or type construction
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                                  ~~~~~~~~~^
../src/robotjs.cc:418:28: error: no member named 'Handle' in namespace 'v8'
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                       ~~~~^
../src/robotjs.cc:418:46: error: use of undeclared identifier 'value'; did you mean 'False'?
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                                             ^~~~~
                                             False
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:304:25: note: 'False' declared here
  friend Local<Boolean> False(Isolate* isolate);
                        ^
../src/robotjs.cc:418:53: error: unexpected type name 'MMKeyFlags': expected expression
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                                                    ^
../src/robotjs.cc:418:65: error: use of undeclared identifier 'flags'
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                                                                ^
../src/robotjs.cc:418:71: error: expected ';' after top level declarator
int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags)
                                                                      ^
                                                                      ;
../src/robotjs.cc:762:1: error: unknown type name 'BMP'
BMP buildBMP(Local<Object> info)
^
../src/robotjs.cc:766:2: error: unknown type name 'BMP'
        BMP img;
        ^
../src/robotjs.cc:768:19: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.width = obj->Get(Nan::New("width").ToLocalChecked())->Uint32Value();
                         ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/robotjs/src/robotjs.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:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/linonetwo/Desktop/repo/zazu/node_modules/robotjs
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN @0.5.2 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fs-xattr):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/linonetwo/.npm/_logs/2019-05-13T10_53_21_446Z-debug.log

Possible Solution

npm cache clean useless now

npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid.

Steps to Reproduce (for bugs)

Installed on a Mac, for example https://github.com/tinytacoteam/zazu

Context

I'm truing to npm i https://github.com/tinytacoteam/zazu

Your Environment

  • RobotJS version: 0.5.1
  • Node.js version: 12.1.0
  • npm version: 6.9.0
  • Operating System: Mac 10.14.4 (18E226)

Most helpful comment

Same issue please fix it

All 12 comments

Even install from github:

"robotjs": "git+https://github.com/octalmage/robotjs.git",

Failed:

Note there is no errors like int GetFlagsFromString(v8::Handle<v8::Value> value, MMKeyFlags* flags) which is fixed by https://github.com/octalmage/robotjs/pull/459

But still some other errors.

> [email protected] install /Users/linonetwo/Desktop/repo/zazu/node_modules/robotjs
> prebuild-install || node-gyp rebuild

  CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:63:39: error: too few arguments to function call, single argument 'context' was not specified
        const size_t x = info[0]->Int32Value();
                         ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:64:39: error: too few arguments to function call, single argument 'context' was not specified
        const size_t y = info[1]->Int32Value();
                         ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:97:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t x = info[0]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:98:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t y = info[1]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:114:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t x = info[0]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:115:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t y = info[1]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:143:39: error: no matching member function for call to 'ToString'
                v8::String::Utf8Value bstr(info[0]->ToString());
                                           ~~~~~~~~~^~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
                    Local<String> ToString(Isolate* isolate) const);
                                  ^
../src/robotjs.cc:159:22: error: no matching member function for call to 'BooleanValue'
                doubleC = info[1]->BooleanValue();
                          ~~~~~~~~~^~~~~~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2559:8: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
  bool BooleanValue(Isolate* isolate) const;
       ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2562:51: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
                V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                  ^
../src/robotjs.cc:239:35: error: too few arguments to function call, single argument 'context' was not specified
        mouseDelay = info[0]->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:251:30: error: too few arguments to function call, single argument 'context' was not specified
        int x = info[0]->Int32Value();
                ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:252:30: error: too few arguments to function call, single argument 'context' was not specified
        int y = info[1]->Int32Value();
                ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:420:36: error: no matching member function for call to 'ToString'
        v8::String::Utf8Value fstr(value->ToString());
                                   ~~~~~~~^~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
                    Local<String> ToString(Isolate* isolate) const);
                                  ^
../src/robotjs.cc:434:30: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
                        v8::Local<v8::Value> v(a->Get(i));
                                                  ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:3416:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:457:38: error: no matching member function for call to 'ToString'
        v8::String::Utf8Value kstr(info[0]->ToString());
                                   ~~~~~~~~~^~~~~~~~
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no
      arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate', but no
      arguments were provided
                    Local<String> ToString(Isolate* isolate) const);
                                  ^
../src/robotjs.cc:589:35: error: too few arguments to function call, single argument 'context' was not specified
        size_t cpm = info[1]->Int32Value();
                     ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:603:38: error: too few arguments to function call, single argument 'context' was not specified
        keyboardDelay = info[0]->Int32Value();
                        ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:639:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t x = info[0]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:640:33: error: too few arguments to function call, single argument 'context' was not specified
        size_t y = info[1]->Int32Value();
                   ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:708:27: error: too few arguments to function call, single argument 'context' was not specified
                x = info[0]->Int32Value();
                    ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.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/robotjs.cc:709:27: error: too few arguments to function call, single argument 'context' was not specified
                y = info[1]->Int32Value();
                    ~~~~~~~~~~~~~~~~~~~ ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/linonetwo/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/robotjs/src/robotjs.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:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/linonetwo/Desktop/repo/zazu/node_modules/robotjs
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN @0.5.2 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fs-xattr):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@linonetwo did you ever figure this out? having a similar issue here

@mcculloughjchris Same issue over here. Pull request #489 seems to fix it on my system, but it hasn't been merged yet.

No commit since June. Maybe this project is not maintained anymore ?
@octalmage ?

Same issue please fix it

A new version of robotjs supporting the latest NodeJS version will be published soon.

@oktapodia still having the exact same issue

Same here

  • MacOS 10.15.1
  • node 12.12.0
  • npm 6.13.1

Not sure if this fits everybody's use case, but I ended up writing a Python script to handle OS automation using pyautogui, and then called it in node using spawn. Not as convenient but it worked well.

Same as @mcculloughjchris , I end up using MacOS's script to control mac keyboard:

const exec = promisify(childProcess.exec)
exec(`Script="tell app \\"System Events\\" to keystroke ${keyForAppleScript}"
          osascript -e "$Script"`)
  1. Please use nvm and switch to the version node@8
  2. Complete installation of all prerequisites from node-gyp

Any updates on this? I can't actually switch node versions due to other technical reasons, so thats not a fix that will work for me. Also I am on Linux in case it's not related

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itsashis4u picture itsashis4u  路  10Comments

pg07codes picture pg07codes  路  3Comments

bradparks picture bradparks  路  14Comments

quinton-ashley picture quinton-ashley  路  6Comments

Androiderr picture Androiderr  路  4Comments