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
Update node-pre-gyp #437
Update node-pre-gyp #437
Conversation
The older `node-pre-gyp` version prevented proper handling with electron (as shown in mapbox/node-pre-gyp#175).
I still get Error: Cannot find module 'opencv' I chanted the local reference to use global reference instead and still fubar. If I use the local version I get a different error... Error: Cannot find module '/Users/csanz/Apps/node-opencv/build/opencv/v6.0.0/Release/node-v48-darwin-x64/opencv.node' |
Me too, with node-pre-gyp 0.6.34 version. Error: Não foi possível encontrar o módulo especificado. |
I get the same error: Cannot find module '...node_modules/opencv/build/opencv/v6.0.0/Release/node-v54-darwin-x64/opencv.node' My node-pre-gyp version is 0.6.36 Any idea how to make opencv work with electron? |
@fakob we've OpenCV running with electron in this project: https://github.com/danschultzer/blazing-bookkeeper |
@danschultzer thanks for the fast response. I will check it out. |
@fakob no problem! You might also find this blog post useful: https://dreamconception.com/tech/electron-how-to-build-package-and-package-3rd-party-binaries-with-electron-builder/ It explains how to build and code sign third party libraries with electron. I also added some comments on OpenCV caveats. |
I get the same thing using @csanz @lapereirabr @fakob any luck figuring out why it's still looking for the wrong module? |
Hi @nicholasc Sorry, I have too little insight why this is happening, but if I remember correctly this solved it for me: export npm_config_target=1.6.10
export npm_config_arch=x64
export npm_config_target_arch=x64
export npm_config_disturl=https://atom.io/download/electron
export npm_config_runtime=electron
export npm_config_build_from_source=true
HOME=~/.electron-gyp npm install Well, it worked for me at least with my setup. See |
@nicholasc I can't remember what I did to resolve it, but I remember seeing the same error. The reason for the happening is that the node V8 engine is different from electron's. In my project I was using electron-boilerplate to do most of the setup, and I think the solution for me was just to run the commands in the right order. There's a readme section on how native modules should be installed. |
The older
node-pre-gyp
0.6.11
version prevented proper handling of electron runtime (as discussed in mapbox/node-pre-gyp#175). bindings.js can't resolve the proper build path for electron. Updating to0.6.30
fixes the issue.Resolves #430