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 install/rebuilt zeromq for Electron-3.0.0 ? #279

Closed
lianhub opened this issue Sep 26, 2018 · 10 comments
Closed

how to install/rebuilt zeromq for Electron-3.0.0 ? #279

lianhub opened this issue Sep 26, 2018 · 10 comments

Comments

@lianhub
Copy link

lianhub commented Sep 26, 2018

I installed Electron-3.0.0 and found that zeromq is not working anymore.
Then I run:
npm rebuild zeromq --runtime=electron --target=3.0.0
But it didn't solve the problem!

Anybody runs zeromq inside Electron-3.0.0 successfully?
Thanks!

@pnpetrov
Copy link

pnpetrov commented Sep 27, 2018

It looks like the binding is abandoned. New versions have not been published for more than a year.

The last version v4.6.0 depends on prebuild-install v2.2.2, which depends on node-abi v2.0.0, which does not support electron v3 as build target. You must manually bump node-abi to at least v2.4.4

@lianhub
Copy link
Author

lianhub commented Sep 27, 2018

nikolovp, thanks for your answer!

So I just rolled back to Electron-v2, and zeromq works again.

@pnpetrov
Copy link

Instead of rolling back to Electron v2, better fork the binding, update the prebuild-install dev dependency to its latest version and publish the module to a private npm registry (if you have one) or to npmjs.com (better namespace it like @lianhub/zeromq or similar to avoid collisions).

This is what I did so I can keep working with latest electron versions.

There is an open pull request for upgrading prebuild-install (#275) but there is no one to accept it.

@lianhub
Copy link
Author

lianhub commented Sep 28, 2018

Hi nikolovp, I followed your instructions:

But when I do "npm install jerry-zeromq --save-dev", I got WARNING:
npm install

[email protected] install D:\elec-test\plc-controller\node_modules\jerry-zeromq
node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install WARN install No prebuilt binaries found (target=8.11.4 runtime=node arch=x64 platform=win32)
Downloading libzmq for Windows
Download finished ...

  • And "jerry-zeromq" did NOT work.
  • (By the way, I use node v8.11.4)

Any hint? Thanks!

@rgbkrk
Copy link
Member

rgbkrk commented Sep 29, 2018

The latest version of zeromq.js was shipped which includes binaries for electron 3. Upgrade to 5.0.0 when you get a chance. 😄

@pnpetrov
Copy link

Cool, this will simplify our workflow.

I have one extra question. What is the reason for requiring msbuild toolset v140 instead of letting node-gyp pick the toolset based on msvs_version? It would be nice to be able to build the binding from source with VS above v2015 when a new electron versions gets published, instead of depending on prebuilt binaries.

@rgbkrk
Copy link
Member

rgbkrk commented Sep 29, 2018

I'd love for it to be able to build the binding from source with VS above v2015 and can't recall why it's pinned. Perhaps you can dig into the source, find out, and send over some patches?

@lianhub
Copy link
Author

lianhub commented Oct 2, 2018

Thanks all you guys!

  • I just upgraded to Electron-v3.0.2, and zeromq.js-v5.0.0
  • Then run: npm rebuild zeromq --runtime=electron --target=3.0.2

And my program runs perfect as expected!!!

@lgeiger
Copy link
Member

lgeiger commented Oct 2, 2018

Cool, glad it works now

@aziotdev
Copy link

I am having the same issue with electron 6.0.2

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

5 participants