peterbraden / node-opencv

OpenCV Bindings for node.js
MIT License
4.37k stars 858 forks source link

[BUG] OpenCV Not Working on MacOS Big Sur 11.6.4 #684

Closed danilo-dsf closed 2 years ago

danilo-dsf commented 2 years ago

Describe the bug Hi guys,

I'm having an issue with opencv lib on my MacOS Big Sur 11.6.4.

I followed the installation instructions and it did not work for me. I mean, the opencv installation had no errors, but when I tried to run a simple nodejs project with the lib installed, I received the error below.

Does anyone know how to fix this?

The simple nodejs project I used can be found here: https://github.com/danilo-dsf/test-opencv

To Reproduce

$ brew install pkg-config

$ brew install opencv@2

$ brew link --force opencv@2

$ mkdir test-opencv

$ cd test-opencv

$ yarn init -y

$ yarn add opencv

$ touch server.js

$ nano server.js - (Write a simple console log and import. the opencv lib)

$ node server.js

Expected behavior Expected tho work fine.

Screenshots https://imgur.com/iuSyq0y.png

OS / Libraries

danilo-dsf commented 2 years ago

Update

I have noticed that opencv@2 has a deprecated warning at homebrew page. So I've installed the opencv@3 package and it worked fine.

That been said, I've opened a pull request updating the install instructions for macOS in the readme file: https://github.com/peterbraden/node-opencv/pull/685

mok419 commented 1 year ago

hoping it works :)), other people reported issues with newer versions of node aswell. :((