npm create @quick-start/electron@latest create the electron-vite-demo
npm install @u4/opencv4nodejs install the opencv4nodejs
add some code in package.json"electron-rebuild": "build-opencv --electron --version 4.5.4 build" and then build the electron npm run electron-rebuild
create a test.js and write some code const cv = require('@u4/opencv4nodejs') console.log(cv.getVersion())
run the test.js and get the correct result:[ 4, 10, 0 ]
in main/index.js add same code const cv = require('@u4/opencv4nodejs') console.log(cv.getVersion()) then run the project by npm run dev,and then got the error as title!
I am confiued by this error,please help me.
(base) ➜ electron-vite-demo brew info opencv
==> opencv: stable 4.10.0 (bottled), HEAD
Open source computer vision library
https://opencv.org/
Installed
/usr/local/Cellar/opencv/4.10.0_2 (982 files, 258.5MB) *
Poured from bottle using the formulae.brew.sh API on 2024-08-14 at 21:06:42
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/o/opencv.rb
License: Apache-2.0
==> Dependencies
Build: cmake ✔, pkg-config ✔, python-setuptools ✔
Required: abseil ✔, ceres-solver ✔, eigen ✔, ffmpeg@6 ✔, freetype ✔, gflags ✔, glog ✔, harfbuzz ✔, jpeg-turbo ✔, libpng ✔, libtiff ✔, numpy ✔, openblas ✔, openexr ✔, openjpeg ✔, openvino ✔, protobuf ✔, python@3.12 ✔, tbb ✔, tesseract ✔, vtk ✔, webp ✔, glew ✔, imath ✔, jsoncpp ✔, libarchive ✔
==> Options
--HEAD
Install HEAD version
Describe the bug
npm create @quick-start/electron@latest
create the electron-vite-demonpm install @u4/opencv4nodejs
install the opencv4nodejsadd some code in package.json
"electron-rebuild": "build-opencv --electron --version 4.5.4 build"
and then build the electronnpm run electron-rebuild
create a test.js and write some code
const cv = require('@u4/opencv4nodejs') console.log(cv.getVersion())
run the test.js and get the correct result:[ 4, 10, 0 ]
in main/index.js add same code
const cv = require('@u4/opencv4nodejs') console.log(cv.getVersion())
then run the project bynpm run dev
,and then got the error as title!I am confiued by this error,please help me.
(base) ➜ electron-vite-demo brew info opencv
==> opencv: stable 4.10.0 (bottled), HEAD Open source computer vision library https://opencv.org/ Installed /usr/local/Cellar/opencv/4.10.0_2 (982 files, 258.5MB) * Poured from bottle using the formulae.brew.sh API on 2024-08-14 at 21:06:42 From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/o/opencv.rb License: Apache-2.0 ==> Dependencies Build: cmake ✔, pkg-config ✔, python-setuptools ✔ Required: abseil ✔, ceres-solver ✔, eigen ✔, ffmpeg@6 ✔, freetype ✔, gflags ✔, glog ✔, harfbuzz ✔, jpeg-turbo ✔, libpng ✔, libtiff ✔, numpy ✔, openblas ✔, openexr ✔, openjpeg ✔, openvino ✔, protobuf ✔, python@3.12 ✔, tbb ✔, tesseract ✔, vtk ✔, webp ✔, glew ✔, imath ✔, jsoncpp ✔, libarchive ✔ ==> Options --HEAD Install HEAD version
(base) ➜ electron-vite-demo node --version v18.20.3
(base) ➜ electron-vite-demo electron --version v31.2.1
Electron-Vite Version
3.3.0
Electron Version
v31.2.1
Vite Version
5.4.1
Validations