I have downloaded the jitsi-meet-electron repo for building desktop app from https://github.com/jitsi/jitsi-meet-electron.git Now, when I am trying to install electron using yarn, I am getting the below error.I think the problem is with the robotjs module.Also, for the python version - the logs shown is 'gyp info find Python using Python version 2.7.12 found at "/usr/bin/python" '
k@k-Lenovo-G50-70:~/17_2_21/jitsi-meet-electron$ yarn add electron
yarn add v1.22.10
warning ../package.json: No license field
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning electron-packager > electron-download > nugget > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning electron-packager > asar > mksnapshot > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning electron-packager > electron-download > nugget > request > har-validator@5.1.5: this library is no longer supported
warning electron-rebuild > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/6] ⡀ robotjs
[-/6] ⡀ waiting...
[-/6] ⡀ waiting...
[-/6] ⡀ waiting...
error /home/k/17_2_21/jitsi-meet-electron/node_modules/robotjs: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /home/k/17_2_21/jitsi-meet-electron/node_modules/robotjs
Output:
prebuild-install WARN install No prebuilt binaries found (target=14.15.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@14.15.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 '/usr/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/k/17_2_21/jitsi-meet-electron/node_modules/robotjs/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/k/.cache/node-gyp/14.15.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/k/.cache/node-gyp/14.15.4',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/k/.cache/node-gyp/14.15.4/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/k/17_2_21/jitsi-meet-electron/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/k/17_2_21/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++
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/k/17_2_21/jitsi-meet-electron/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 (/usr/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:277:12)
gyp ERR! System Linux 4.15.0-133-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/k/17_2_21/jitsi-meet-electron/node_modules/robotjs
I found a way out.Below are the steps:
k@k-Lenovo-G50-70:~/26_2_21/ti$ git clone https://github.com/jitsi/jitsi-meet-electron.git
k@k-Lenovo-G50-70:~/26_2_21/ti$ ls
jitsi-meet-electron
k@k-Lenovo-G50-70:~/26_2_21/ti$ cd jitsi-meet-electron
https://github.com/jitsi/jitsi-meet-electron-utils
NOTE: For Linux install libxtst-dev and libpng++-dev (sudo apt-get install libxtst-dev libpng++-dev). This dependancies are related to RobotJS which is a dependency of jitsi-meet-electron-utils. You can see the build instructions for RobotJS here
k@k-Lenovo-G50-70:~/26_2_21/ti/jitsi-meet-electron$ sudo apt-get install libxtst-dev libpng++-dev
k@k-Lenovo-G50-70:~/26_2_21/ti/jitsi-meet-electron$ npm install
Finally, for the desktop app to run,
k@k-Lenovo-G50-70:~/17_2_21/repos/a_21_2_21$ npm start
jitsi-meet-electron@2.4.2 start /home/k/17_2_21/repos/a_21_2_21 webpack --config ./webpack.main.js --mode development && concurrently "npm:watch" "electron ./build/main.js"