justadudewhohacks / justadudewhohacks/opencv4nodejs
JS error when running electron app on another computer
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
I am using opencv4nodejs in my electron app.
When I package the app and try to run it on another computer I am getting following error:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: dlopen(/var/folders/7m/klqbsvis2iqg_mb_pdvv79fhO000gn/
T/.app.repeato.uuz70R, 1): Library not loaded: @rpath/
libopency_core.3.4.dylib
Referenced from: /var/folders/7m/kiqbsvis2iqg_mb_pdvv79fhOG00gn/
Tf.app.repeato.uuz70R
Reason: image not found
at process.module.(anonymous function) (as dlopen} (ELECTRON_ASAR.js:166:20)
at Object.Module._extensions..node (internal/modules/cjsfosder.js:740:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:180:18)
at Module.load (internal{modules/cjsfoader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Madule._load {internal/modules/cjs/loader.js:551:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/Applications/Repeato.app/Contents/Resources/app.asar/node_modules/opencv4nodejs/lib/cv.js:17:8)
at Object. (/Applications/Repeato.app/Contents/Resources/app.asar/node_modules/opencv4nodejs/lib/cv.js:28:3)
Any ideas what's wrong?
I found a very [similar issue on github][1], but not sure if it really is
[1]: https://github.com/electron-userland/electron-builder/issues/2738
Contributor guide
Research direction
Start with the packaged Electron app error and the loading path in node_modules/opencv4nodejs/lib/cv.js. Compare this report with the linked electron-builder issue to determine whether the missing libopency_core.3.4.dylib is a packaging or native-library distribution problem; done means the packaged app starts on another computer without this dlopen error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, node.js
- Domain
- desktop-dev, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100