Comments (11)
So I managed to get it to build but I'm not sure how...
Now I'm seeing the following:
c = require('opencv')
Error: Cannot find module 'opencv'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at repl:1:6
at REPLServer.self.eval (repl.js:112:21)
at Interface. (repl.js:250:12)
at Interface.EventEmitter.emit (events.js:88:17)
at Interface._onLine (readline.js:199:10)
at Interface._line (readline.js:519:8)
I tried the suggestion in a previous issue to run ./build.sh but that still didn't fix the issue.
Any ideas?
from node-opencv.
I found out the problem.
init.cc:
NODE_MODULE(binding, init)
but needs to be:
NODE_MODULE(opencv, init)
I made the change, rebuilt and it loads up fine.
b = require('./lib/bindings.js')
{ version: '2.4',
readImage: [Function],
Point: [Function: Point],
Matrix: { [Function: Matrix] Eye: [Function] },
CascadeClassifier: [Function: CascadeClassifier],
VideoCapture: [Function: VideoCapture],
Contours: [Function: Contours] }
c = require('./lib/opencv.js')
{ ImageStream:
{ [Function]
super_:
{ [Function: Stream]
super_: [Function: EventEmitter],
Stream: [Circular] } } }
from node-opencv.
Interesting - nice. What platform are you on because I've never seen this? Can you make this a pull request so I can run the travis tests agains it?
Thanks!
from node-opencv.
I'm on OSX 10.8.2
I'm making a pull request now.
from node-opencv.
closed by #18
from node-opencv.
I'm on OSX 10.8.2 and I'm still having this issue. Could it be due to my opencv version? I have v2.4.2 installed via Homebrew.
from node-opencv.
wait, I hadn't republished on npm yet - try again now.
from node-opencv.
Huh, still not working. This is the error message if that's any help: https://gist.github.com/2327c58034aa01572275.
from node-opencv.
You're seeing an error with building node-opencv, the fix that I peterbraden provided was for loading the module into node after you successfully built it.
Did you try to set your PKG_CONFIG_PATH environment variable to point to the opencv pkgconfig directory (with macports it's /opt/local/lib/pkgconfig/, not sure what it is for homebrew installs) ? I installed opencv 2.4.2 with macports and had to manually set this environment variable since the installation path was not the default one.
from node-opencv.
Bingo! Thanks!
from node-opencv.
For Ubuntu users that have this problem, just install libopencv-dev package too.
from node-opencv.
Related Issues (20)
- module import Error HOT 2
- [BUG]not a function HOT 3
- [BUG] npm install opencv `gyp` failed with exit code: 1
- npm install opencv `gyp` failed with exit code: 1
- [BUG] Unable to install "gyp ERR! stack Error: `make` failed with exit code: 2" HOT 4
- Update to more recent openCV version HOT 1
- [BUG] build error (on npm install) Windows 10 HOT 2
- [BUG] On RaspPi 3, nodejs, simply require opencv crash HOT 1
- A modest proposal about N-API
- Depth Map Example
- [BUG] Cannot Install opencv js with npm (windows 10/ubuntu 20.04) HOT 3
- [BUG] Unable to install on MacOS BigSur 12.2.3 HOT 2
- How to draw a rectangle what method?[BUG] HOT 3
- [BUG] FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
- [BUG] Nodemon crashes when using cv.findContour() function
- Does interpolation work when using resize()?
- [BUG] OpenCV Not Working on MacOS Big Sur 11.6.4 HOT 2
- Template matching
- Can opencv-nodejs read h264 video?
- brew install opencv@2 Error: opencv@2 has been disabled because it is not supported upstream! HOT 1
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 node-opencv.