Skip to content

Issue with importing cv #882

@akash-mudgal-eb

Description

@akash-mudgal-eb

Hi Everyone,

I am getting the the error ERR_DLOPEN_FAILED while trying to import opencv4nodejs with typescript.

The import statement I am using is this:

import * as cv from 'opencv4nodejs';

The error trace:

2024-06-05T11:54:06.190Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: file:///D:/MSTeams%20Repos/BIM/MSTeamsAppTestingWDIO/wdio.electr
on-conf.ts: The specified module could not be found.
\?\D:\MSTeams Repos\BIM\MSTeamsAppTestingWDIO\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node
Error: The specified module could not be found.
\?\D:\MSTeams Repos\BIM\MSTeamsAppTestingWDIO\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object. (D:\MSTeams Repos\BIM\MSTeamsAppTestingWDIO\node_modules\opencv4nodejs\lib\cv.js:58:8)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.require.extensions. [as .js] (D:\MSTeams Repos\BIM\MSTeamsAppTestingWDIO\node_modules\ts-node\src\index.ts:1608:43)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object. (D:\MSTeams Repos\BIM\MSTeamsAppTestingWDIO\node_modules\opencv4nodejs\lib\opencv4nodejs.js:11:79)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) {
code: 'ERR_DLOPEN_FAILED'
}

I have installed opencv, set the environment variables and disabled autobuild. The package successfully installs, but I get this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions