Comments (11)
same question
from opencv4nodejs.
Did you solve it?
from opencv4nodejs.
Did you solve it?
no
from opencv4nodejs.
This should solve the issue.
from opencv4nodejs.
The problem that I was facing had something to do with the opencv4nodejs autobuild.
I was able to solve this by manually building opencv4nodejs.
"opencv4nodejs": { "disableAutoBuild": "1", "OPENCV_INCLUDE_DIR": "C:\\opencv\\build\\include", "OPENCV_LIB_DIR": "C:\\opencv\\build\\x64\\vc15\\lib", "OPENCV_BIN_DIR": "C:\\opencv\\build\\x64\\vc14\\bin" },
"scripts": { "install": "build-opencv --incDir C:\\opencv\\build\\include --libDir C:\\opencv\\build\\x64\\vc15\\lib --binDir C:\\opencv\\build\\x64\\vc15\\bin --nobuild rebuild" }
Replace each path in the lines above with your own respective path to opencv and add them to your package.json file,
Then run, npm run install
to build opencv4nodejs. After a successful build you can then run your application.
from opencv4nodejs.
When I try to do that I just get
'build-opencv' is not recognized as an internal or external command
from opencv4nodejs.
try using npx
npx build-opencv --help
and use @u4/opencv4nodejs
from opencv4nodejs.
try using
npx
npx build-opencv --help
and use @u4/opencv4nodejs
Thanks. I did switch over to @u4/opencv4nodejs. It does work better, I still have a problem when it comes to getting it to work in Electron though. I submitted an issue about it to @u4/opencv4nodejs
from opencv4nodejs.
I do not use electron, please refer to the u4 election sample.
from opencv4nodejs.
I tried and it gives this err;
I also tried with sudo and its still same
info config found opencv4nodejs section in /Users/yscnpkr/Desktop/projeler/FaceRecognition/package.json
info envAutodetect autodetect 0 changes
info applyEnvsFromPackageJson the following opencv4nodejs environment variables are set in the package.json:
info applyEnvsFromPackageJson disableAutoBuild: 1
info applyEnvsFromPackageJson opencvIncludeDir: /opt/homebrew/Cellar/opencv/4.7.0_7/include
info applyEnvsFromPackageJson opencvLibDir: /opt/homebrew/Cellar/opencv/4.7.0_7/lib
info applyEnvsFromPackageJson opencvBinDir: /opt/homebrew/Cellar/opencv/4.7.0_7/bin
info install Using openCV 0.0.0
info install Using lib dir: /opt/homebrew/Cellar/opencv/4.7.0_7/lib
info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set skipping auto build...
info install writing auto-build file into directory: /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv-build/dist/opencv-0.0.0-8b1ea/auto-build.json
info install Cretate link /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv-build/dist/latest to /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv-build/dist/opencv-0.0.0-8b1ea
info install
info install Found the following libs:
info install core: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_core.4.7.0.dylib
info install imgproc: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_imgproc.4.7.0.dylib
info install imgcodecs: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_imgcodecs.4.7.0.dylib
info install videoio: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_videoio.4.7.0.dylib
info install highgui: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_highgui.4.7.0.dylib
info install video: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_video.4.7.0.dylib
info install calib3d: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_calib3d.4.7.0.dylib
info install features2d: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_features2d.4.7.0.dylib
info install objdetect: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_objdetect.4.7.0.dylib
info install dnn: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_dnn.4.7.0.dylib
info install ml: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_ml.4.7.0.dylib
info install flann: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_flann.4.7.0.dylib
info install photo: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_photo.4.7.0.dylib
info install gapi: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_gapi.4.7.0.dylib
info install face: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_face.4.7.0.dylib
info install img_hash: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_img_hash.4.7.0.dylib
info install text: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_text.4.7.0.dylib
info install tracking: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_tracking.4.7.0.dylib
info install videostab: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_videostab.4.7.0.dylib
info install xfeatures2d: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_xfeatures2d.4.7.0.dylib
info install ximgproc: /opt/homebrew/Cellar/opencv/4.7.0_7/lib/libopencv_ximgproc.4.7.0.dylib
info defines
info defines Setting the following defines:
info defines OPENCV4NODEJS_FOUND_LIBRARY_CORE OPENCV4NODEJS_FOUND_LIBRARY_IMGPROC OPENCV4NODEJS_FOUND_LIBRARY_IMGCODECS
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOIO OPENCV4NODEJS_FOUND_LIBRARY_HIGHGUI OPENCV4NODEJS_FOUND_LIBRARY_VIDEO
info defines OPENCV4NODEJS_FOUND_LIBRARY_CALIB3D OPENCV4NODEJS_FOUND_LIBRARY_FEATURES2D OPENCV4NODEJS_FOUND_LIBRARY_OBJDETECT
info defines OPENCV4NODEJS_FOUND_LIBRARY_DNN OPENCV4NODEJS_FOUND_LIBRARY_ML OPENCV4NODEJS_FOUND_LIBRARY_FLANN
info defines OPENCV4NODEJS_FOUND_LIBRARY_PHOTO OPENCV4NODEJS_FOUND_LIBRARY_GAPI OPENCV4NODEJS_FOUND_LIBRARY_FACE
info defines OPENCV4NODEJS_FOUND_LIBRARY_IMG_HASH OPENCV4NODEJS_FOUND_LIBRARY_TEXT OPENCV4NODEJS_FOUND_LIBRARY_TRACKING
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOSTAB OPENCV4NODEJS_FOUND_LIBRARY_XFEATURES2D OPENCV4NODEJS_FOUND_LIBRARY_XIMGPROC
info install
info install Setting the following includes:
info includes /opt/homebrew/Cellar/opencv/4.7.0_7/include
info libs
info libs Setting lib from -L/opt/homebrew/Cellar/opencv/4.7.0_7 : lib, -lopencv_core, -lopencv_imgproc, -lopencv_imgcodecs, -lopencv_videoio, -lopencv_highgui, -lopencv_video, -lopencv_calib3d, -lopencv_features2d, -lopencv_objdetect, -lopencv_dnn, -lopencv_ml, -lopencv_flann, -lopencv_photo, -lopencv_gapi, -lopencv_face, -lopencv_img_hash, -lopencv_text, -lopencv_tracking, -lopencv_videostab, -lopencv_xfeatures2d, -lopencv_ximgproc, lib
info install Spawning in directory:/Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv4nodejs node-gyp process: node-gyp rebuild --jobs max --release
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
gyp ERR! System Darwin 22.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/.bin/node-gyp" "rebuild" "--jobs" "max" "--release"
gyp ERR! cwd /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv4nodejs
gyp ERR! node -v v18.14.2
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
error: Error: Command failed: node-gyp rebuild --jobs max --release
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
gyp ERR! System Darwin 22.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/.bin/node-gyp" "rebuild" "--jobs" "max" "--release"
gyp ERR! cwd /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv4nodejs
gyp ERR! node -v v18.14.2
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
code: 1,
killed: false,
signal: null,
cmd: 'node-gyp rebuild --jobs max --release '
}
ERR! install node-gyp failed and return Error Command failed: node-gyp rebuild --jobs max --release
ERR! install gyp info it worked if it ends with ok
ERR! install gyp info using [email protected]
ERR! install gyp info using [email protected] | darwin | arm64
ERR! install gyp ERR! clean error
ERR! install gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
ERR! install gyp ERR! System Darwin 22.5.0
ERR! install gyp ERR! command "/usr/local/bin/node" "/Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/.bin/node-gyp" "rebuild" "--jobs" "max" "--release"
ERR! install gyp ERR! cwd /Users/yscnpkr/Desktop/projeler/FaceRecognition/node_modules/@u4/opencv4nodejs
ERR! install gyp ERR! node -v v18.14.2
ERR! install gyp ERR! node-gyp -v v9.4.0
ERR! install gyp ERR! not ok
ERR! install return code: 1
from opencv4nodejs.
try using
npx
npx build-opencv --help
and use @u4/opencv4nodejs
i am facing very much issue in build, error saying that build failed. How can I build? (Macos)
from opencv4nodejs.
Related Issues (20)
- Install failing at 55% MacOS Monterey HOT 2
- [!] RollupError: Could not resolve "../build/Release/opencv4nodejs.node" from "../build/Release/opencv4nodejs.node?commonjs-external" HOT 1
- Cannot find module 'C:\Users\pierr\Desktop\onnxjs\node_modules\opencv4nodejs\build\Release\opencv4nodejs' HOT 2
- Imencode - OpenCV Error: (!image.empty()) in imencode, in file... RPI4 HOT 1
- Correct the state of the `opencv4nodejs` package on the NPM. HOT 5
- canot load opencv4nodejs after install HOT 1
- Cannot find module 'D:\Web\opencv\node_modules\opencv4nodejs\build\Release\opencv4nodejs' HOT 2
- Error: CalcHist - object has no property: ranges HOT 1
- Can't resolve '../build/Release/opencv4nodejs.node' HOT 1
- Cannot find module /node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs'
- why no cv.compare or mat.compare function?
- how to catch mouse event on imshow
- ar
- Type error with mat.drawCountours()
- Unable to install opencv4nodejs HOT 1
- Unable to install in Ubuntu 22.05
- Ssim library
- Issues with node-gyp
- Issue with cv.Mat
- Issue with importing cv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv4nodejs.