gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.16k stars 658 forks source link

error installing npm package #838

Open pablocar80 opened 1 month ago

pablocar80 commented 1 month ago

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 node-gyp@9.4.1
npm error gyp info using node@20.14.0 | 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
pablocar80 commented 1 month ago

The command was:

npm i gpu.js --add
pablocar80 commented 1 month ago

This was on Linux with WSL. I tried on the same repository on MacOS and I get a very similar message.

jamesadcock commented 3 weeks ago

@pablocar80 I had the same issue using V18 of node worked as a tempoary solution