Error while installing robotjs
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:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.2.0-86-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/itsashis4u/projects/robot/node_modules/robotjs
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Linux 3.2.0-86-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "robotjs@latest" "--save"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
Another rebuild error:
> $ npm install robotjs
-
> [email protected] install /home/mod/work/nodejs/robotjs/node_modules/robotjs
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory `/home/mod/work/nodejs/robotjs/node_modules/robotjs/build'
CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from ../src/keypress.h:6:0,
from ../src/robotjs.cc:7:
../src/keycode.h:55:23: fatal error: X11/Xutil.h: No such file or directory
#include <X11/Xutil.h>
^
compilation terminated.
make: *** [Release/obj.target/robotjs/src/robotjs.o] Error 1
make: Leaving directory `/home/mod/work/nodejs/robotjs/node_modules/robotjs/build'
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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.16.0-41-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mod/work/nodejs/robotjs/node_modules/robotjs
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.16.0-41-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "robotjs"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mod/work/nodejs/robotjs/npm-debug.log
I also had an issue.
drobati@ATL-N-DEREKR ~
$ npm install robotjs
-
> [email protected] install C:\Users\drobati\node_modules\robotjs
> node-gyp rebuild
C:\Users\drobati\node_modules\robotjs>if not defined npm_config_node_gyp (node "c:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT
gyp ERR! stack at exports._errnoException (util.js:746:11)
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\drobati\node_modules\robotjs
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "robotjs"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\drobati\npm-debug.log
Sorry guys! For the first two Linux needs a few packages:
sudo apt-get install libxtst-dev libpng-dev
I need to get the README updated.
For the Windows error I'm not completely sure.
@octalmage I ran the command again. (The first time looks like some connection timeout.)
drobati@ATL-N-DEREKR ~
$ npm install robotjs
|
> [email protected] install C:\Users\drobati\node_modules\robotjs
> node-gyp rebuild
C:\Users\drobati\node_modules\robotjs>if not defined npm_config_node_gyp (node "
c:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modu
les\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [C:\Users\drobati\node_modules\robotjs\build\binding.s
ln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\nod
e_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\drobati\node_modules\robotjs
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files (x8
6)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "robotjs"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\drobati\npm-debug.log
I got this. Looks like windows has some dependencies?
Looks like on Windows you need:
@octalmage Thanks. It was resolved on linux by installing the mentioned packages. :+1:
@octalmage I'll download VS13 Express. Already have Python 2.7.3.
I'm going to close this, if building fails after installing the requirements please let me know! I've updated the readme to link to the node-gyp readme:
Sorry to open this back up, but here's my rebuild error. I'm assuming this has to do with the newer version of XCode? I'm on version 7.1 currently and have Command Line Tools installed. I've tried a couple different node versions. v0.12.7 works fine, but I have other dependencies that need v4.x.x. The error below is running with v4.0.0.
$ npm install robotjs
-
> [email protected] install /Users/gregholguin/Documents/Projects/Personal/twitch-plays-undertale/node_modules/robotjs
> node-gyp rebuild
CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:76:16: error: cannot initialize a variable of type
'MMMouseButton' (aka 'CGMouseButton') with an rvalue of type
'_MMMouseButton'
MMMouseButton button = LEFT_BUTTON;
^ ~~~~~~~~~~~
../src/robotjs.cc:129:16: error: cannot initialize a variable of type
'MMMouseButton' (aka 'CGMouseButton') with an rvalue of type
'_MMMouseButton'
MMMouseButton button = LEFT_BUTTON;
^ ~~~~~~~~~~~
../src/robotjs.cc:397:13: error: assigning to 'MMKeyFlags' (aka 'CGEventFlags')
from incompatible type '_MMKeyFlags'
*flags = MOD_ALT;
^ ~~~~~~~
../src/robotjs.cc:401:13: error: assigning to 'MMKeyFlags' (aka 'CGEventFlags')
from incompatible type '_MMKeyFlags'
*flags = MOD_META;
^ ~~~~~~~~
../src/robotjs.cc:405:13: error: assigning to 'MMKeyFlags' (aka 'CGEventFlags')
from incompatible type '_MMKeyFlags'
*flags = MOD_CONTROL;
^ ~~~~~~~~~~~
../src/robotjs.cc:409:13: error: assigning to 'MMKeyFlags' (aka 'CGEventFlags')
from incompatible type '_MMKeyFlags'
*flags = MOD_SHIFT;
^ ~~~~~~~~~
../src/robotjs.cc:413:13: error: assigning to 'MMKeyFlags' (aka 'CGEventFlags')
from incompatible type '_MMKeyFlags'
*flags = MOD_NONE;
^ ~~~~~~~~
../src/robotjs.cc:425:13: error: cannot initialize a variable of type
'MMKeyFlags' (aka 'CGEventFlags') with an rvalue of type '_MMKeyFlags'
MMKeyFlags flags = MOD_NONE;
^ ~~~~~~~~
../src/robotjs.cc:479:13: error: cannot initialize a variable of type
'MMKeyFlags' (aka 'CGEventFlags') with an rvalue of type '_MMKeyFlags'
MMKeyFlags flags = MOD_NONE;
^ ~~~~~~~~
9 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 (/Users/gregholguin/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "/Users/gregholguin/.nvm/versions/node/v4.0.0/bin/node" "/Users/gregholguin/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gregholguin/Documents/Projects/Personal/twitch-plays-undertale/node_modules/robotjs
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/gregholguin/.nvm/versions/node/v4.0.0/bin/node" "/Users/gregholguin/.nvm/versions/node/v4.0.0/bin/npm" "install" "robotjs"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/gregholguin/Documents/Projects/Personal/twitch-plays-undertale/npm-debug.log
See #116, this is a new issue I'm looking into!
Most helpful comment
Sorry guys! For the first two Linux needs a few packages:
sudo apt-get install libxtst-dev libpng-dev
I need to get the README updated.
For the Windows error I'm not completely sure.