UrielCh / opencv4nodejs

ESM Nodejs bindings to OpenCV 3/4
MIT License
254 stars 51 forks source link

Raspberry Pi, Nx Workspace. #152

Open yllhazirii opened 4 months ago

yllhazirii commented 4 months ago

Hi!

I am having issue installing the package in my raspberry pi with an NX workspace.

This is the version I am trying to install "@u4/opencv4nodejs": "^7.1.0".

os Linux 6.6.31+rpt-rpi-v8 node v22.4.1 npm v10.8.1 node-gyp -v v10.2.0

This is the error I am getting. pm error /home/scibis/app1/node_modules/@u4/opencv-build/script/src/helper/detect.js:98 npm error const [candidate] = (0, glob_1.globSync)(lookup); npm error ^ npm error npm error TypeError: (0 , glob_1.globSync) is not a function or its return value is not iterable npm error at Object.detectLibDir (/home/scibis/app1/node_modules/@u4/opencv-build/script/src/helper/detect.js:98:49) npm error at StaticTools.autoLocatePrebuild (/home/scibis/app1/node_modules/@u4/opencv-build/script/src/StaticTools.js:78:40) npm error at Object.compileLib (/home/scibis/app1/node_modules/@u4/opencv4nodejs/cjs/install/compileLib.js:232:52) npm error at Object. (/home/scibis/app1/node_modules/@u4/opencv4nodejs/bin/install.js:4:12) npm error at Module._compile (node:internal/modules/cjs/loader:1467:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1551:10) npm error at Module.load (node:internal/modules/cjs/loader:1282:32) npm error at Module._load (node:internal/modules/cjs/loader:1098:12) npm error at TracingChannel.traceSync (node:diagnostics_channel:315:14) npm error at wrapModuleLoad (node:internal/modules/cjs/loader:215:24) npm error npm error Node.js v22.4.1 npm error gyp: Call to 'node ./bin/install.js OPENCV4NODEJS_DEFINES' returned exit status 1 while in 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. (/home/scibis/app1/node_modules/node-gyp/lib/configure.js:317:18) npm error gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm error gyp ERR! System Linux 6.6.31+rpt-rpi-v8 npm error gyp ERR! command "/usr/bin/node" "/home/scibis/app1/node_modules/.bin/node-gyp" "rebuild" npm error gyp ERR! cwd /home/scibis/app1/node_modules/@u4/opencv4nodejs npm error gyp ERR! node -v v22.4.1 npm error gyp ERR! node-gyp -v v10.2.0 npm error gyp ERR! not ok

When I try and install it as follows (from https://github.com/UrielCh/opencv4nodejs/issues/67)

mkdir testcv cd testcv/ npm init -y export OPENCV4NODEJS_DISABLE_AUTOBUILD=1 time npm install @u4/opencv4nodejs --loglevel verbose (same version as above).

Would appreciate your help.

Thank you!

UrielCh commented 4 months ago

It may be linked to glob. This library was inactive for years. I tried to build a small alternative to replace it, but glob was resurrected and has since received massive updates and breaking changes.

I have multiple Raspberry Pi devices lying around, so I should be able to test it.

goedonsopjani commented 4 months ago

I'm having the same issue :(