Opencv4nodejs: process.dlopen(...) - Error: The specified module could not be found.

Created on 1 Nov 2017  路  2Comments  路  Source: justadudewhohacks/opencv4nodejs

The Error:

module.js:597
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\me\Downloads\opencv_test\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\me\Downloads\opencv_test\node_modules\opencv4nodejs\lib\opencv4nodejs.js:7:8)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

The Code I'm trying to execute:

const cv = require('opencv4nodejs');
const template = cv.imread('image.png');

Versions etc ...

node -v
v6.11.4

npm list -g -depth 0
C:\Users\me\AppData\Roaming\npm
`-- [email protected]

npm list -depth 0
C:\Users\me\Downloads\opencv_test
`-- [email protected]

echo %OPENCV_DIR%
C:\opencv

echo %OPENCV_LIB_DIR%
C:\opencv\build\x64\vc14\lib

echo %OPENCV_INCLUDE_DIR%
C:\opencv\build\include

Tried with: opencv-3.3.1-vc14.exe

I tried to npm rebuild already, also I tried to install completly new with the same outcome.
Install looked good to me.

Thanks for any help!

Most helpful comment

Hey,

this error means that it could not load the binaries, e.g. the opencv .dlls. Are you sure that you have the opencv binary path added to your system path?

Another reason for that error could be that the dlls do not match with the linked libraries. For example if you try to link static debug libraries with release dlls or maybe you still have opencv binaries from another version than 3.3.1 in your system path.

All 2 comments

Hey,

this error means that it could not load the binaries, e.g. the opencv .dlls. Are you sure that you have the opencv binary path added to your system path?

Another reason for that error could be that the dlls do not match with the linked libraries. For example if you try to link static debug libraries with release dlls or maybe you still have opencv binaries from another version than 3.3.1 in your system path.

Damn ... a typo :|
Thanks for pointing quickly in the right direction! 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

developer239 picture developer239  路  5Comments

ShadabFaiz picture ShadabFaiz  路  7Comments

djipco picture djipco  路  7Comments

asishap007 picture asishap007  路  6Comments

bgsuello picture bgsuello  路  6Comments