Edex-ui: How to build using node.js 14 on ubuntu 18.04

Created on 9 Jul 2020  Â·  7Comments  Â·  Source: GitSquared/edex-ui

Hey,

I was able to test this using npm run start but when I am trying to build it using the source, here's what I am getting:

> [email protected] build-linux /home/exp/work/open-source/edex-ui
> electron-builder build -l -p never

  • electron-builder  version=22.5.1 os=5.3.0-62-generic
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • rebuilding native dependencies  [email protected] platform=linux arch=x64
  • packaging       platform=linux arch=x64 electron=8.3.1 appOutDir=dist/linux-unpacked
  • building        target=AppImage arch=x64 file=dist/eDEX-UI Linux (x86_64).AppImage
  • rebuilding native dependencies  [email protected] platform=linux arch=ia32
  ⨯ cannot execute  cause=exit status 1
                    out=
    > [email protected] install /home/exp/work/open-source/edex-ui/prebuild-src/node_modules/node-pty
    > node scripts/install.js

    make: Entering directory '/home/exp/work/open-source/edex-ui/prebuild-src/node_modules/node-pty/build'
      CXX(target) Release/obj.target/pty/src/unix/pty.o
    pty.target.mk:107: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
    make: Leaving directory '/home/exp/work/open-source/edex-ui/prebuild-src/node_modules/node-pty/build'

                    errorOut=In file included from /usr/include/errno.h:25:0,
                     from /home/exp/.electron-gyp/8.3.1/include/node/uv/errno.h:25,
                     from /home/exp/.electron-gyp/8.3.1/include/node/uv.h:52,
                     from ../../nan/nan.h:53,
                     from ../src/unix/pty.cc:20:
    /usr/include/features.h:424:12: fatal error: sys/cdefs.h: No such file or directory
     #  include <sys/cdefs.h>
                ^~~~~~~~~~~~~
    compilation terminated.
    make: *** [Release/obj.target/pty/src/unix/pty.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:314:20)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
    gyp ERR! System Linux 5.3.0-62-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/exp/work/open-source/edex-ui/prebuild-src/node_modules/node-pty
    gyp ERR! node -v v14.5.0
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node scripts/install.js`
    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!     /home/exp/.npm/_logs/2020-07-09T16_16_03_187Z-debug.log

                    command=/usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js rebuild [email protected]
                    workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-linux: `electron-builder build -l -p never`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build-linux 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!     /home/exp/.npm/_logs/2020-07-09T16_16_30_033Z-debug.log

Can you please help me fix this?

question

All 7 comments

Are you on x32? Maybe try using node 12 LTS.

No. I am using 64-bit installation

Screenshot from 2020-07-09 22-11-40

Same issue with me. I am using x64 machine with elementary os 5. Node version: 10.19.

Screenshot from 2020-07-10 18-17-18

Try with node 12.

Try with node 12.

Same error occured. Trying with node version: 12.16.1

I was facing similar issue. Following commands should fix it:

sudo apt-get --reinstall install libc6 libc6-dev
sudo apt-get install g++-multilib

Do note that this issue is not related to edex-ui. Kudos to @GitSquared for doing a fine job here.!

@aggarwaldev Thanks for figuring this out. A pity node-gyp error messages aren't more helpful.

Was this page helpful?
0 / 5 - 0 ratings