tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.41k stars 641 forks source link

electron (atom shell) #302

Closed gtaranas closed 2 months ago

gtaranas commented 9 years ago

is there anyway to work with electron (http://electron.atom.io):

[Error: The edge module has not been pre-compiled for node.js version v0.12.7. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.]

eblumenfeld commented 9 years ago

I'm having the same issue with iojs.com

ghost commented 9 years ago

I too experience this error:

Uncaught Error: The edge edge\lib\edge.js:19 module has not been pre-compiled for node.js version v2.3.1. You must build a custom version of edge.node. Please refer to https://github.com/tjanczuk/edge for building instructions.

It's even printing out a high node.js version i dont have :) I tried different distributions of node.js, without any luck.

romovs commented 9 years ago

To make Edge.js work in Electron it needs to be compiled using the Electron headers - https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md

Also the module requires a little bit of patching. See the top five commits here.

anaisbetts commented 9 years ago

You can include the edge-atom-shell module which does the required patching - if you run it through electron-rebuild like the doc above says, it definitely works

jimmcslim commented 9 years ago

A well documented sample of using Electron, Edge and C# on Windows would be fantastic.

EdAyers commented 9 years ago

An example I've found is this. He also has some other good posts explaining other things in electron. Sadly he doesn't post the source and if I follow along with the example I get that classic error that kills the javascript process;

Uncaught Error: The edge module has not been pre-compiled for node.js version v2.3.1. 
You must build a custom version of edge.node. 
Please refer to https://github.com/tjanczuk/edge for building instructions. 
......

@paulcbetts has kindly made electron-rebuild which solves this problem by doing some node magic so that the rest of us don't need an intimate knowledge of native node module builds. Sadly there is an issue with this tool which may affect some people on windows. electron-rebuild - refuses to npm install on my windows machine. The relevant issue is here. Hopefully this will be fixed. I agree with @jimmcslim that a minimum example of getting these fantastic technologies to work would be hyper-useful.

anaisbetts commented 9 years ago

electron-rebuild won't work with edge.js at the moment, I've made a fork of edge.js that definitely does work on Windows with the currently released Electron.

anaisbetts commented 9 years ago

@EdAyers That bug is kind of a mess, I don't really understand what's going on there. Can you paste your issue there?

WorldMaker commented 8 years ago

It would be nice if there was an electron with edge prebuilt distribution...

anaisbetts commented 8 years ago

@WorldMaker edge-atom-shell

WorldMaker commented 8 years ago

@paulcbetts I was hoping for something more along the lines of an electron-prebuilt like fork that produced an electron-edge.exe that prebaked edge into an Electron.exe. That would probably be a nice thing to have.

(I can't seem to get edge-atom-shell to build at all and similar fork electron-edge builds but renames the module electron-edge which breaks compatibility with third party modules trying to require edge... Neither electron-edge nor edge proper seem to be building Native .NET support on my machine, yet .NET Core works, but won't load the COM component I seem to need... At this point it looks like my best bet is to child-process my way to a console app.)

mvrk21 commented 8 years ago

I am not able to get electron-edge work with electron. I am able to build using electron-rebuild command. But I get an error saying "Module did not self register". Operating system : Windows 10 Arch : x64 node version : 6.5.0 npm : 4.0.1

Can someone help me with this ??