stellarchat/desktop-client

Following document "Build yourself" gives me Errors!

Closed this issue · 1 comments

Hi,
As per document I tried to clone the project to work on it locally on "Ubuntu 18.04" and as you may see below I'm getting errors that I don't understand. may some one help me out. Regards

`majid@Dell:~/WebstormProjects/desktop-client$ node -v
v8.11.3

majid@Dell:~/WebstormProjects/desktop-client$ yarn install
yarn install v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/4] ⠂ node-hid
[-/4] ⠂ waiting...
[3/4] ⠂ ed25519
error /home/majid/WebstormProjects/desktop-client/node_modules/node-hid: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /home/majid/WebstormProjects/desktop-client/node_modules/node-hid
Output:
prebuild-install WARN install No prebuilt binaries found (target=10.11.0 runtime=node arch=x64 platform=linux)
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.11.0 | linux | x64
gyp info spawn /usr/bin/python2
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/majid/WebstormProjects/desktop-client/node_modules/node-hid/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/majid/.node-gyp/10.11.0/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/majid/.node-gyp/10.11.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/majid/.node-gyp/10.11.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/majid/WebstormProjects/desktop-client/node_modules/node-hid',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build'
CC(target) Release/obj.target/hidapi/hidapi/linux/hid.o
../hidapi/linux/hid.c:44:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^~~~~~~~~~~
compilation terminated.
hidapi.target.mk:101: recipe for target 'Release/obj.target/hidapi/hidapi/linux/hid.o' failed
make: Leaving directory '/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build'
make: *** [Release/obj.target/hidapi/hidapi/linux/hid.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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.15.0-36-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/majid/WebstormProjects/desktop-client/node_modules/node-hid
gyp ERR! node -v v10.11.0

majid@Dell:~/WebstormProjects/desktop-client$ yarn start
yarn run v1.10.1
$ electron .
{ Error: Could not locate the bindings file. Tried:
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/Debug/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/Release/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/out/Debug/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/Debug/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/out/Release/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/Release/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/default/HID.node
→ /home/majid/WebstormProjects/desktop-client/node_modules/node-hid/compiled/8.9.3/linux/x64/HID.node
at bindings (/home/majid/WebstormProjects/desktop-client/node_modules/bindings/bindings.js:93:9)
at loadBinding (/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/nodehid.js:16:38)
at Object.showdevices [as devices] (/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/nodehid.js:132:5)
at getDevices (/home/majid/WebstormProjects/desktop-client/node_modules/@ledgerhq/hw-transport-node-hid/lib/getDevices.js:19:28)
at Function.TransportNodeHid.listen (/home/majid/WebstormProjects/desktop-client/node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js:414:54)
at Function.module.exports.HardwareWalletLedger.init (/home/majid/WebstormProjects/desktop-client/src/main/hardwareWalletLedger.js:314:59)
at App. (/home/majid/WebstormProjects/desktop-client/main.js:167:26)
at emitTwo (events.js:131:20)
at App.emit (events.js:214:7)
tries:
[ '/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/Debug/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/Release/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/out/Debug/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/Debug/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/out/Release/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/Release/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/build/default/HID.node',
'/home/majid/WebstormProjects/desktop-client/node_modules/node-hid/compiled/8.9.3/linux/x64/HID.node' ] }
`

Uninstalling nodejs and installing using nvm the nodejs (v8.12.0) solved the problem
`majid@Dell:~/WebstormProjects/desktop-client$ node -v
v8.12.0

majid@Dell:~/WebstormProjects/desktop-client$ yarn install
yarn install v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ rm -rf node_modules/ed25519; electron-builder install-app-deps
• electron-builder version=20.15.1
• loaded configuration file=/home/majid/WebstormProjects/desktop-client/electron-builder.json
• rebuilding native production dependencies platform=linux arch=x64
• rebuilding native dependency name=keccak
• rebuilding native dependency name=node-hid
Done in 43.30s.
`