Skip to content
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

How to use the latest electron #24

Open
abulka opened this issue Mar 24, 2018 · 1 comment
Open

How to use the latest electron #24

abulka opened this issue Mar 24, 2018 · 1 comment

Comments

@abulka
Copy link

abulka commented Mar 24, 2018

It would be good to be able to use the latest version of electron rather than be stuck with 1.7.6, however for some reason the dependency on the special version of zerorpc repo you have kindly provided prevents this - see #23.

I thought I had solved the problem by installing the latest versions of electron etc. and inspired by #22, even the latest "official" zerorpc, which resulted in these dependencies in my package.json:

"devDependencies": {
  "electron": "^1.8.4",
  "electron-packager": "^11.1.0",
  "electron-rebuild": "^1.7.3"
},
"dependencies": {
  "zerorpc": "^0.9.7"
}

After running these commands

brew install zeromq
npm install
./node_modules/.bin/electron-rebuild

I was able to run the example successfully.

Unfortunately when I package the app and run it on a virgin Mac system, libzmq.5.dylib is not found - same issue as zeromq/zeromq.js#131.

Despite the advice in that issue to avoid brew's zeromq and to instead install npm's zeromq with npm i zeromq --save - the problem persists because zerorpc uses zmq which "doesn't provide prebuild statically linked binaries. So you can't package your app with this module". Which presumably is one of the reasons that you made your custom version of zerorpc which changes the source code slightly to require zeromq instead of zmq.

Its all a bit confusing - it seems strange to me that npm zeromq would tolerate being 'unpackagable' because it requires zmq. And I don't understand why using your custom zerorpc repo locks us into an old version of electron (module mismatch issue).

Aside: The need for specific version numbers all over the readme instructions, and the use of custom repos and old versions of electron might put people off this wonderful project/solution.

Is there a way we can use the latest electron e.g. 1.8.4 with this electron-python solution - in a way which is deployable/packagable?

@abulka
Copy link
Author

abulka commented Mar 25, 2018

After discovering that installing and running electron-rebuild fixes module mismatch problems (see #23) I can now successfully use the latest version of Electron.

I still have to use fyear's forked zerorpc repository if I want to successfully package my app. The good news is that the forked repo is up to date (as of March 2018) with the official https://github.com/0rpc/zerorpc-node and presumably can be kept up to date using git, so I'm now fine depending on a non official repo. The various questions re zerorpc and its dependencies remain for the curious, but no longer essential to understand ;-)

Incidentally, I have also since discovered that brew install zeromq is not needed, as the python pip install zerorpc is sufficient and also provides the zerorpc CLI for testing purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant