New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't Install with Electron (Mac Big Sur). Error: Cannot find module "node_modules/opencv4nodejs-prebuilt/build/Release/opencv4nodejs" #221
Comments
Thanks very much @s1hofmann. After installing nut-js@next, I get this error when trying $ npm start:
I'm not really familiar with After getting the error above, I tried running An hour of installations seems like overkill for me to test out the @next package. Am I missing something, or is this to be expected? |
Nut.js comes with prebuilds of opencv to prevent the user from performing that 30 minutes build whenever an installation is done. For me it looks like the pre built does not match your node version. Edit: After some google work, I found out that electron ships it's own node fork. Unfortunately I've no experience with that. |
Hi @NL33 👋 I ran a small sample using Electron 12 with Did you follow the Electron usage guide? Given your description of a 30 minutes installation process I'm assuming some things, please correct me if I'm wrong:
Additional infos, skip if not interestedI'm not familiar with native node addons, could you explain a bit?
The problem with Since Electron is not exactly node, it comes with a slightly different ABI, so in order to use a Ok, so how does this work in
|
Thanks for your follow-up. It's very helpful. Yes I am currently running node v 13.0.1. I reverted the app to prior to going through the nut.js installation. So now the app is back to where it was prior. I thought I'd try to go through the electron install again, so I just ran:
And I got these errors:
Do you recommend I do something different? |
Hi @NL33 👋 The fastest thing you could do (if feasible for you) would be to switch to an LTS version of node (12 or 14) or the current latest version (15). If you can't switch to a different node version you'd have to run the compilation once on install, but the |
It worked! I just went ahead and upgraded Node to latest stable (node v 14.6.1). Then, per your info: package.json:
And from there no errors and I'm able to require nutjs in the app. Thanks again. |
You're welcome 👍 |
I stumbeled upon this issue for some days ago, i had to run
|
I get
As stated in #300 And I tried But it still not working... Or...Does this precompiled binary work in electron@15 now? If not, how to recompile? Can you add it to the readme? I can see there is only prerequisite in https://github.com/nut-tree/nut.js#manual-build, but no "how to trigger manual rebuild" |
Version
@nut-tree/nut-js: 1.6.0
electron: 12.0.2
electron-rebuild: 2.3.5
node-gyp: 8.0.0
opencv4nodejs: 5.6.0
Mac OS: 11.1
Short overview
I am trying to get nut.js to work with electron (my machine: Mac, OS 11.1). I have gone through the installation steps, but when I go to start the app, I continually get the error:
Cannot find module "node_modules/opencv4nodejs-prebuilt/build/Release/opencv4nodejs"
.If I try to run
$ npm run rebuild
, I get the error:Issue occurs on
Detailed error description
I have gone through the installation steps for Electron and Mac. Including (in my electron app):
$ npm i @nut-tree/nut-js
$ npm i -D electron-rebuild
And then attempted to run
$ npm i electron-rebuild
but got error:
I then installed additional items:
All installed without error. But even after these steps, I still get the node gyp error above whenever I run
$ npm run rebuild
.And if I try $
npm start
I get the error:Steps to reproduce error
See above description of steps I've taken.
Additional content
N/A
The text was updated successfully, but these errors were encountered: