Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

How to build using node.js 14 on ubuntu 18.04 #738

Closed
creativenoobie opened this issue Jul 9, 2020 · 7 comments
Closed

How to build using node.js 14 on ubuntu 18.04 #738

creativenoobie opened this issue Jul 9, 2020 · 7 comments

Comments

@creativenoobie
Copy link

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:

> edex-ui@3.0.0-pre 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  dependencies=node-pty@0.9.0 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  dependencies=node-pty@0.9.0 platform=linux arch=ia32
  ⨯ cannot execute  cause=exit status 1
                    out=
    > node-pty@0.9.0 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! node-pty@0.9.0 install: `node scripts/install.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the node-pty@0.9.0 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 node-pty@0.9.0
                    workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! edex-ui@3.0.0-pre build-linux: `electron-builder build -l -p never`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the edex-ui@3.0.0-pre 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?

@GitSquared
Copy link
Owner

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

@creativenoobie
Copy link
Author

No. I am using 64-bit installation

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

@suman-kr
Copy link

suman-kr commented Jul 10, 2020

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

@GitSquared
Copy link
Owner

Try with node 12.

@suman-kr
Copy link

Try with node 12.

Same error occured. Trying with node version: 12.16.1

@aggarwaldev
Copy link

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.!

@GitSquared
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants