justadudewhohacks / justadudewhohacks/opencv4nodejs

Unable to install/build on node versions higher that version 14, npm version 6

Open
#850 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

# Error Message
$ npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known
to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path node_modules/opencv4nodejs
npm ERR! command failed
npm ERR! command sh -c node ./install/install.js
npm ERR! info install using lib dir: node_modules/opencv-build/opencv/build/lib
npm ERR! node_modules/opencv4nodejs/install/install.js:37
npm ERR! throw new Error('library dir does not exist: ' + libDir)
npm ERR! ^
npm ERR!
npm ERR! Error: library dir does not exist: node_modules/opencv-build/opencv/build/lib
npm ERR! at Object. (node_modules/opencv4nodejs/install/install.js:37:9)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR! at node:internal/main/run_main_module:17:47

I tried with and without OPENCV4NODEJS_DISABLE_AUTOBUILD flag set.
*OpenCV version* 5.6.0

*With OpenCV-contrib?* no

*OS*: Ubuntu

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported npm install failure on Ubuntu with a Node.js version above 14, starting with node_modules/opencv4nodejs/install/install.js and the package-lock.json warning. Check why node_modules/opencv-build/opencv/build/lib is absent; done means installation completes successfully without the reported library-dir error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, opencv
Domain
build-system, computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.