opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

Module not found: Error: Can't resolve '../build/Release/opencv4nodejs.node'

Open Ninei opened this issue 3 years ago • 3 comments

I'm receiving a error while trying to import in nodejs typescript & webpack project. import * as cv from 'opencv4nodejs'

Receiving issues... ERROR in ./node_modules/opencv4nodejs/lib/opencv4nodejs.js Module not found: Error: Can't resolve '../build/Release/opencv4nodejs.node' in '/Volumes/NineiDB/DB/Workspace/Working/CloudX/node_modules/opencv4nodejs/lib' @ ./node_modules/opencv4nodejs/lib/opencv4nodejs.js 11:29-75

OS: Mac Install script is as follows. echo export OPENCV4NODEJS_DISABLE_AUTOBUILD=1 npm install opencv4nodejs Install step is NO error.

Ninei avatar Dec 21 '20 09:12 Ninei

Any update? Still can't find the build. I'm using manually installed opencv 4.5 via Brew. I'm stuck, on Macos Catalina, XCode 12.3, CommanLineTools 12.3.

Fully installed package, appeared in package.json, but still error.

KeitelDOG avatar Mar 21 '21 03:03 KeitelDOG

Anyone been able to resolve this?

riccardolardi avatar Jun 20 '21 10:06 riccardolardi

@riccardolardi I fixed it long ago, it was because Node Gyp failed to build the ../build/Release/opencv4nodejs.node file, that is required to process the OpenCV codes in Node JS. You can read the discussion here where I showed the bugs and how I turned around easily to make it build and work : https://github.com/justadudewhohacks/opencv4nodejs/issues/805

KeitelDOG avatar Jul 04 '21 14:07 KeitelDOG