opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

NODE_MODULE_VERSION conflict.

Open Shamim1977 opened this issue 5 years ago • 2 comments

Using: OS: Win 10, x64 Electron: 6.1.9 OpenCV: 4.2.0 opencv4nodejs: 5.5.0

Tried this: https://www.npmjs.com/package/opencv4nodejs and this: https://medium.com/@makearts/how-to-use-opencv4-on-electron-113b11623b7a

and here goes my package.json- { "name": "ocvface", "productName": "OCV", "version": "1.0.0", "description": "OpenCV Implementation", "homepage": "https://mysite.org", "main": "app/main.js", "scripts": { "start": "electron .", "electron-rebuild": "electron-rebuild -w opencv4nodejs", "package-win": "electron-packager . OCVFace --overwrite --asar --platform=win32 --arch=x64 --icon=app/appicon.ico --prune=true --out=release-builds", "package-mac": "electron-packager . OCVFace --overwrite --asar --platform=darwin --arch=x64 --icon=app/appicon.icns --prune=true --out=release-builds" }, "keywords": [ "opencv", "face recog", "image manipulation" ], "author": "Shamim Hossain", "copyright": "© 2020, SPT", "license": "ISC", "dependencies": { "canvas": "^2.6.1", "drivelist": "8.0.3", "electron": "^6.1.9", "electron-about-window": "1.13.2", "electron-screencapture": "^1.1.0", "electron-settings": "3.2.0", "fs-extra": "^8.1.0", "iso-639-1": "^2.1.0", "jimp": "^0.9.6", "jquery": "^3.4.1", "jsdom": "^16.2.1", "node-gyp": "^6.1.0", "node-webvtt-youtube": "^1.0.0", "opencv4nodejs": "^5.5.0", "recursive-readdir-async": "^1.1.6", "sqlite3": "^4.1.1", "wordcount": "^1.1.1" }, "opencv4nodejs": { "disableAutoBuild": 0, "opencvIncludeDir": "F:\ElectronWorks\opencv\build\include", "opencvLibDir": "F:\ElectronWorks\opencv\build\x64\vc14\lib", "opencvBinDir": "F:\ElectronWorks\opencv\build\x64\vc14\bin" }, "devDependencies": { "asar": "2.1.0", "electron-packager": "^14.2.1", "electron-rebuild": "^1.10.1" } }

but the NODE_MODULE_VERSION conflict remains. Is anybody actually successful getting "opencv4nodejs" working?!! Any alternative to this?

Uncaught Error: The module '\?\F:\ElectronWorks\OCVFace\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 73. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.func (electron/js2c/asar.js:138:31) at process.func [as dlopen] (electron/js2c/asar.js:138:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18) at Object.func (electron/js2c/asar.js:138:31) at Object.func [as .node] (electron/js2c/asar.js:138:31) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (F:\ElectronWorks\OCVFace\node_modules\opencv4nodejs\lib\cv.js:58:8)

Shamim1977 avatar Mar 19 '20 12:03 Shamim1977

I have the same issue :(

Uncaught Error: The module '\?\C:\OneDrive\WebApps\ManMachine\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 76. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.func (electron/js2c/asar.js:140) at process.func [as dlopen] (electron/js2c/asar.js:140) at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016) at Object.func (electron/js2c/asar.js:140) at Object.func [as .node] (electron/js2c/asar.js:140) at Module.load (internal/modules/cjs/loader.js:816) at Module._load (internal/modules/cjs/loader.js:728) at Module._load (electron/js2c/asar.js:717) at Function.Module._load (electron/js2c/asar.js:717) at Module.require (internal/modules/cjs/loader.js:853)

ISebSej avatar Apr 03 '20 23:04 ISebSej

Got the same issue

Error: The module '\?\E:\nodeProject\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 76. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.func [as dlopen] (electron/js2c/asar.js:140:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18) at Object.func [as .node] (electron/js2c/asar.js:140:31) at Module.load (internal/modules/cjs/loader.js:816:32) at Module._load (internal/modules/cjs/loader.js:728:14) at Function.Module._load (electron/js2c/asar.js:748:26) at Module.require (internal/modules/cjs/loader.js:853:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (E:\nodeProject\jdSupport\node_modules\opencv4nodejs\lib\cv.js:58:8) at Module._compile (internal/modules/cjs/loader.js:968:30)

This solved my problem install cnpm cnpm rebuild --runtime=electron --target=8.5.5 --disturl=https://atom.io/download/atom-shell --abi=72

--target ---electron version --abi --NODE_MODULE_VERSION version
Change to what you need

ttttupup avatar Mar 11 '21 13:03 ttttupup