GitSquared / edex-ui

A cross-platform, customizable science fiction terminal emulator with advanced monitoring & touchscreen support.
GNU General Public License v3.0
40.62k stars 2.56k forks source link

WSL2 Ubuntu 18.04 NPM build failure #1056

Closed fkan-ec closed 3 years ago

fkan-ec commented 3 years ago

➜ edex-ui git:(226) npm install npm ERR! code 1 npm ERR! path /home/fkan/Git/edex-ui/node_modules/lzma-native npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@15.10.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/lzma-native/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/fkan/.cache/node-gyp/15.10.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/home/fkan/.cache/node-gyp/15.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/fkan/Git/edex-ui/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/fkan/.cache/node-gyp/15.10.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/fkan/Git/edex-ui/node_modules/lzma-native', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: Undefined variable module_path in binding.gyp while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/home/fkan/Git/edex-ui/node_modules/node-gyp/lib/configure.js:351:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:378:20) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) npm ERR! gyp ERR! System Linux 4.19.104-microsoft-standard npm ERR! gyp ERR! command "/usr/bin/node" "/home/fkan/Git/edex-ui/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/fkan/Git/edex-ui/node_modules/lzma-native npm ERR! gyp ERR! node -v v15.10.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /home/fkan/.npm/_logs/2021-02-25T04_04_05_512Z-debug.log

wrac4242 commented 3 years ago

are you trying to build from source? or just run from source? and could you give us the log file please

fkan-ec commented 3 years ago

510 timing build:link:node_modules/node-gyp/node_modules/rimraf Completed in 20ms 511 timing build:link:node_modules/terser Completed in 20ms 512 timing build:link Completed in 24ms 513 info run lzma-native@6.0.1 install node_modules/lzma-native node-gyp rebuild 514 info run lzma-native@6.0.1 install { code: 1, signal: null } 515 timing reify:rollback:createSparse Completed in 578ms 516 timing reify:rollback:retireShallow Completed in 0ms 517 timing command:install Completed in 5041ms 518 verbose stack Error: command failed 518 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) 518 verbose stack at ChildProcess.emit (node:events:378:20) 518 verbose stack at maybeClose (node:internal/child_process:1067:16) 518 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) 519 verbose pkgid lzma-native@6.0.1 520 verbose cwd /home/fkan/Git/edex-ui 521 verbose Linux 4.19.104-microsoft-standard 522 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" 523 verbose node v15.10.0 524 verbose npm v7.5.3 525 error code 1 526 error path /home/fkan/Git/edex-ui/node_modules/lzma-native 527 error command failed 528 error command sh -c node-gyp rebuild 529 error gyp info it worked if it ends with ok 529 error gyp info using node-gyp@7.1.2 529 error gyp info using node@15.10.0 | linux | x64 529 error gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3" 529 error gyp info spawn /usr/bin/python3 529 error gyp info spawn args [ 529 error gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/node-gyp/gyp/gyp_main.py', 529 error gyp info spawn args 'binding.gyp', 529 error gyp info spawn args '-f', 529 error gyp info spawn args 'make', 529 error gyp info spawn args '-I', 529 error gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/lzma-native/build/config.gypi', 529 error gyp info spawn args '-I', 529 error gyp info spawn args '/home/fkan/Git/edex-ui/node_modules/node-gyp/addon.gypi', 529 error gyp info spawn args '-I', 529 error gyp info spawn args '/home/fkan/.cache/node-gyp/15.10.0/include/node/common.gypi', 529 error gyp info spawn args '-Dlibrary=shared_library', 529 error gyp info spawn args '-Dvisibility=default', 529 error gyp info spawn args '-Dnode_root_dir=/home/fkan/.cache/node-gyp/15.10.0', 529 error gyp info spawn args '-Dnode_gyp_dir=/home/fkan/Git/edex-ui/node_modules/node-gyp', 529 error gyp info spawn args '-Dnode_lib_file=/home/fkan/.cache/node-gyp/15.10.0/<(target_arch)/node.lib', 529 error gyp info spawn args '-Dmodule_root_dir=/home/fkan/Git/edex-ui/node_modules/lzma-native', 529 error gyp info spawn args '-Dnode_engine=v8', 529 error gyp info spawn args '--depth=.', 529 error gyp info spawn args '--no-parallel', 529 error gyp info spawn args '--generator-output', 529 error gyp info spawn args 'build', 529 error gyp info spawn args '-Goutput_dir=.' 529 error gyp info spawn args ] 529 error gyp: Undefined variable module_path in binding.gyp while trying to load binding.gyp 529 error gyp ERR! configure error 529 error gyp ERR! stack Error: gyp failed with exit code: 1 529 error gyp ERR! stack at ChildProcess.onCpExit (/home/fkan/Git/edex-ui/node_modules/node-gyp/lib/configure.js:351:16) 529 error gyp ERR! stack at ChildProcess.emit (node:events:378:20) 529 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) 529 error gyp ERR! System Linux 4.19.104-microsoft-standard 529 error gyp ERR! command "/usr/bin/node" "/home/fkan/Git/edex-ui/node_modules/.bin/node-gyp" "rebuild" 529 error gyp ERR! cwd /home/fkan/Git/edex-ui/node_modules/lzma-native 529 error gyp ERR! node -v v15.10.0 529 error gyp ERR! node-gyp -v v7.1.2 529 error gyp ERR! not ok 530 verbose exit 1

wrac4242 commented 3 years ago

just checking, have you tried running from source, not directly building?

fkan-ec commented 3 years ago

This is the log from npm install. I tried the release build which give me the futex error. Not sure what you mean by running from source?

wrac4242 commented 3 years ago

instead of turning it into its own executable, which takes a while, slowing down dev time. You can run it directly from the source, instructions are here

fkan-ec commented 3 years ago

Clone a clean repo and run the "npm run install-linux" command in wsl2 ubuntu console 0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'install-linux' ] 1 info using npm@7.5.3 2 info using node@v15.10.0 3 timing config:load:defaults Completed in 1ms 4 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 1ms 5 timing config:load:builtin Completed in 1ms 6 timing config:load:cli Completed in 1ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:/home/fkan/Git/test.git/.npmrc Completed in 1ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/home/fkan/.npmrc Completed in 0ms 11 timing config:load:user Completed in 0ms 12 timing config:load:file:/usr/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:setUserAgent Completed in 1ms 17 timing config:load:setEnvs Completed in 0ms 18 timing config:load Completed in 5ms 19 verbose npm-session 45b1ee4796ae5571 20 timing npm:load Completed in 11ms 21 timing command:run-script Completed in 15890ms 22 verbose stack Error: command failed 22 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27) 22 verbose stack at ChildProcess.emit (node:events:378:20) 22 verbose stack at maybeClose (node:internal/child_process:1067:16) 22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) 23 verbose pkgid edex-ui@2.2.6 24 verbose cwd /home/fkan/Git/test.git 25 verbose Linux 4.19.104-microsoft-standard 26 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "install-linux" 27 verbose node v15.10.0 28 verbose npm v7.5.3 29 error code 127 30 error path /home/fkan/Git/test.git 31 error command failed 32 error command sh -c npm install && cd src && npm install && ./../node_modules/.bin/electron-rebuild -f -w node-pty && cd .. 33 verbose exit 127

fkan-ec commented 3 years ago

edex-ui@2.2.6 install-linux npm install && cd src && npm install && ./../node_modules/.bin/electron-rebuild -f -w node-pty && cd ..

added 309 packages, and audited 310 packages in 12s

22 packages are looking for funding run npm fund for details

found 0 vulnerabilities

added 106 packages, and audited 107 packages in 4s

2 packages are looking for funding run npm fund for details

found 0 vulnerabilities sh: 1: ./../node_modules/.bin/electron-rebuild: not found npm ERR! code 127 npm ERR! path /home/fkan/Git/test.git npm ERR! command failed npm ERR! command sh -c npm install && cd src && npm install && ./../node_modules/.bin/electron-rebuild -f -w node-pty && cd ..

npm ERR! A complete log of this run can be found in: npm ERR! /home/fkan/.npm/_logs/2021-02-27T07_46_11_846Z-debug.log

wrac4242 commented 3 years ago

can you send the log file? however i suspect the issue is with WSL

GitSquared commented 3 years ago

We don't support running/building in wsl, but you can try to npm uninstall electron-rebuild before running npm install.