gpu.js
gpu.js copied to clipboard
error installing npm package
Error output:
npm error code 1
npm error path /home/pablo/gits/inference-ts/node_modules/gl
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild
npm error prebuild-install info begin Prebuild-install version 7.1.2
npm error prebuild-install info looking for local prebuild @ prebuilds/gl-v5.0.3-node-v115-linux-x64.tar.gz
npm error prebuild-install info looking for cached prebuild @ /home/pablo/.npm/_prebuilds/eab152-gl-v5.0.3-node-v115-linux-x64.tar.gz
npm error prebuild-install http request GET https://github.com/stackgl/headless-gl/releases/download/v5.0.3/gl-v5.0.3-node-v115-linux-x64.tar.gz
npm error prebuild-install http 404 https://github.com/stackgl/headless-gl/releases/download/v5.0.3/gl-v5.0.3-node-v115-linux-x64.tar.gz
npm error prebuild-install warn install No prebuilt binaries found (target=20.14.0 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | x64
npm error gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/home/pablo/gits/inference-ts/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/pablo/gits/inference-ts/node_modules/gl/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/pablo/gits/inference-ts/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/pablo/.cache/node-gyp/20.14.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/pablo/.cache/node-gyp/20.14.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/home/pablo/gits/inference-ts/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/pablo/.cache/node-gyp/20.14.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/pablo/gits/inference-ts/node_modules/gl',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error /bin/sh: 1: pkg-config: not found
npm error gyp: Call to 'pkg-config --libs-only-L --libs-only-other x11 xi xext' returned exit status 127 while in angle/src/angle.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.onCpExit (/home/pablo/gits/inference-ts/node_modules/node-gyp/lib/configure.js:325:16)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Linux 5.15.153.1-microsoft-standard-WSL2
npm error gyp ERR! command "/usr/local/bin/node" "/home/pablo/gits/inference-ts/node_modules/.bin/node-gyp" "rebuild"
npm error gyp ERR! cwd /home/pablo/gits/inference-ts/node_modules/gl
npm error gyp ERR! node -v v20.14.0
npm error gyp ERR! node-gyp -v v9.4.1
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/pablo/.npm/_logs/2024-10-12T17_43_39_793Z-debug-0.log
The command was:
npm i gpu.js --add
This was on Linux with WSL. I tried on the same repository on MacOS and I get a very similar message.
@pablocar80 I had the same issue using V18 of node worked as a tempoary solution
Same issue
Same issue. Can't install this.
Same issue on MacOS
same problem here. To work with python 3.12, should update gl lib to 8.1.6 (because of deps in node-gyp 9.4.1, should use ^10.2). I'm on ubuntu 24.04
My dirty workaround: add to package.json "overrides": { "gl": "^8.1.6" }
Thanks weagle08 for pointing me in the right direction through #836 . I was able to update the dependencies as per weagle08's fork. The build works with Node v22.14.0. It does not work on 22 due to a bug in vinyl js which gulp depends on - https://github.com/gulpjs/vinyl-fs/issues/350. Node 23 doesn't work due to https://github.com/stackgl/headless-gl/issues/303. Also, the gulp build addon for streamx needed to be changed as per https://github.com/gulpjs/gulp/issues/2802. The PR is https://github.com/gpujs/gpu.js/pull/840. I am using gpu.js in browser and was able to verify that our use case seemed to work as expected with the built dist files. The tests passed fine but am not sure what other functionalities are affected by this update.
We need this functionality in every node version from so on.