Jitsi-meet-electron npm install error

I am trying to follow what looks to be very simple instructions listed here: https://github.com/jitsi/jitsi-meet-electron#development

whether I use yarn or npm install to install the package.json dependencies I get an error either way. They both seem to be the same error, just the loggin is a bit different. I have provided both for arguments sake.

I should note that I have installed node-gyp and made sure I have the latest build-esentials to run any make commands

OS I am developing is Linux Mint 18.3

npm install:

> robotjs@0.6.0 install /home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.18.4 runtime=node arch=x64 libc= platform=linux)
make: Entering directory '/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/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++
In file included from ../src/keypress.h:6:0,
                 from ../src/robotjs.cc:7:
../src/keycode.h:112:23: fatal error: X11/Xutil.h: No such file or directory
compilation terminated.
robotjs.target.mk:130: recipe for target 'Release/obj.target/robotjs/src/robotjs.o' failed
make: *** [Release/obj.target/robotjs/src/robotjs.o] Error 1
make: Leaving directory '/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-112-generic
gyp ERR! command "/home/thorakmedichi/.nvm/versions/node/v12.18.4/bin/node" "/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

yarn

error /home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.18.4 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@12.18.4 | linux | x64
gyp info find Python using Python version 2.7.12 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/thorakmedichi/.cache/node-gyp/12.18.4/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/thorakmedichi/.cache/node-gyp/12.18.4',
gyp info spawn args   '-Dnode_gyp_dir=/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/thorakmedichi/.cache/node-gyp/12.18.4/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/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++
In file included from ../src/keypress.h:6:0,
                 from ../src/robotjs.cc:7:
../src/keycode.h:112:23: fatal error: X11/Xutil.h: No such file or directory
compilation terminated.
robotjs.target.mk:130: recipe for target 'Release/obj.target/robotjs/src/robotjs.o' failed
make: Leaving directory '/home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs/build'
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 (/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-112-generic
gyp ERR! command "/home/thorakmedichi/.nvm/versions/node/v12.18.4/bin/node" "/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/thorakmedichi/Development/Projects/stormfree/webrtc-video-react/node_modules/robotjs

You seem to be missing the X11 development headers. The package is libx11-dev on Debian derivatives.

@saghul Thanks for that. doing sudo apt-get install libx11-dev got me past that error… however I am now experiencing a different error when trying to do yarn' or npm install`

make: Entering directory '/home/thorakmedichi/Development/Projects/stormfree/jitsi-meet-electron/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++
../src/robotjs.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE keyToggle(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/robotjs.cc:592:17: warning: ‘down’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    toggleKeyCode(key, down, flags);
                 ^
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:290,
                 from ../src/robotjs.cc:2:
../../nan/nan_implementation_12_inl.h: In function ‘void InitAll(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../../nan/nan_implementation_12_inl.h:119:1: warning: inlining failed in call to ‘static Nan::imp::FactoryBase<v8::FunctionTemplate>::return_t Nan::imp::Factory<v8::FunctionTemplate>::New(Nan::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>)’: --param large-function-growth limit reached [-Winline]
 Factory<v8::FunctionTemplate>::New( FunctionCallback callback
 ^
In file included from ../../nan/nan.h:290:0,
                 from ../src/robotjs.cc:2:
../../nan/nan_new.h:239:47: warning: called from here [-Winline]
     return imp::Factory<T>::New(callback, data);
                                               ^
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:290,
                 from ../src/robotjs.cc:2:
../../nan/nan_implementation_12_inl.h:119:1: warning: inlining failed in call to ‘static Nan::imp::FactoryBase<v8::FunctionTemplate>::return_t Nan::imp::Factory<v8::FunctionTemplate>::New(Nan::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>)’: --param large-function-growth limit reached [-Winline]
 Factory<v8::FunctionTemplate>::New( FunctionCallback callback
 ^
In file included from ../../nan/nan.h:290:0,
                 from ../src/robotjs.cc:2:
../../nan/nan_new.h:239:47: warning: called from here [-Winline]
     return imp::Factory<T>::New(callback, data);
                                               ^
  CC(target) Release/obj.target/robotjs/src/deadbeef_rand.o
  CC(target) Release/obj.target/robotjs/src/mouse.o
../src/mouse.c:12:35: fatal error: X11/extensions/XTest.h: No such file or directory
compilation terminated.
robotjs.target.mk:133: recipe for target 'Release/obj.target/robotjs/src/mouse.o' failed
make: *** [Release/obj.target/robotjs/src/mouse.o] Error 1
make: Leaving directory '/home/thorakmedichi/Development/Projects/stormfree/jitsi-meet-electron/node_modules/robotjs/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-112-generic
gyp ERR! command "/home/thorakmedichi/.nvm/versions/node/v12.18.4/bin/node" "/home/thorakmedichi/.nvm/versions/node/v12.18.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/thorakmedichi/Development/Projects/stormfree/jitsi-meet-electron/node_modules/robotjs

Any ideas how to solve this issue?

Install these 2 as well: libxtst-dev libpng++-dev

1 Like