-
Notifications
You must be signed in to change notification settings - Fork 56
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
Electron support? #32
Comments
Im trying to make a node-irsdk + electron app happen, but im getting compatabilty issues. Is there a version of electron known to be working? |
I made it work with electron 1.8.5 |
The latest release had electron binary for v57 ABI. But that's just prebuild binaries. Node.js binary is for v64 ABI so at least Electron 3.0.0 should work if you compile it yourself. There is guide for installing node.js build tools on windows: https://github.com/nodejs/node-gyp#on-windows It seems there is some issue at the moment since builds have been failing last month: https://ci.appveyor.com/project/apihlaja/node-irsdk/history I guess issue is some outdated dependencies, ie. |
Ok, now there is a new release of
Let me know if you have compatabilty issues with newer versions still. |
Hi guys, I'm currently having a similar issue trying to get the package to work with an electron app. After installing node-irsdk I get the error:
I checked in explorer to see if the file is missing but its there. I also ran electron-rebuild (rebuild command for native modules, is this even native?) without any success. My project currently runs electron version 4.1.5, an older project which runs 2.0.17 is working fine. Is there anything I can do to make it run? Thx for any help 👍 |
Sorry, maybe dumb question, how to use these binary relases (IrSdkNodeBindings.node from node-irsdk-v2.1.5-electron-v69-win32-x64)? I'm new to node / electron, tried: but got:
Not surprisingly Im working with: https://github.com/maximegris/angular-electron in branch angular7 which is using: |
You shouldn't be requiring that file yourself, that's handled by lib itself. For some reason, that doesn't work. I'll take a look when I have time (next week maybe). It seems there is some things to catch up for me. This extension has worked since node.js v0.12 days without much work but it seems now there has been some changes. I'm not mainaining anything else related to node.js native addons so I'm a bit out of loop. Earlier, I used bindings-module. I dont remember why I dropped it. That might be the first thing to try. |
Thanks a lot for this fast answer <3 |
Finally, I managed to update nan and update binaries for node.js v12. I didnt test Electron yet but at least new version compiles now. |
Thx for the update Antti! Unfortunately it still doesn't work for me no matter if I use electron or not.
|
Just did some testing again and the error tells me that it somehow doesnt find the created .node file which is getting imported at line 1. I cloned your repo and ran the commands I also created a .js file (containing node-irsdk relevant code) which I ran with |
I was about to look it myself too finally today. I don't really have any idea what's causing the issue. I'll probably just try to use bindings-module again. I dropped that at some point because it looked like unnecessary dep. I didn't find any PRs or issues from it related to v12 or new Elecron so maybe it simply works 😅 |
Hmm.. I can't replicate the issue using Node.js v12
Attempt 1:
And in Node.js REPL
Attempt 2:
And then in REPL:
And doing same in |
I can run it fine if I use node to start the script as well but not if I want to use it in my vue.js project (error is not vue related I tried other frameworks as well) https://github.com/sabifa/node-irsdk-vue |
Isn't that purely browser-side code? That's not going to work: There is heavily outdated example of how to do it with Node.js using Socket.io: https://github.com/apihlaja/node-irsdk-inspector |
I thought its good to try it without electron to determine if it's electron which is causing the issue. Nevertheless it also doesn't work with electron 😢 Clone this and try to install node-irsdk and use it - I'm getting the same error. (Electron + Vue.js + node-irsdk has worked a couple of months ago) |
Electron-Vue-Boilerplate seems to be very tiny wrapper which runs normal browser app in Electron. You should have access to |
Oh my god, of course! This is the reason because it worked in the past. I used another way to initialize the electron project, namely this. It uses node to start the electron app and oh wonder it just works! Sorry for taking your time.. 😅 It is working now 👍 |
I tried to create a quick start based on the default electron quick start but I found this issue: prebuild/prebuild#249 Ie. currently my prebuild binaries for Electron v5 binaries are actually for Node.js v5. That was causing some head scratching. I subbed the issue, I'll try to complete quick start when I have actually working binary easily available. I guess electron-vue gets around that issues somehow by forcing rebuild. |
Not sure if thats related but I had to use electron-rebuild, after rebuilding it worked fine. |
electron-rebuild doesn't seem to do anything, no matter what flags I give for it. It just happily says "Build Complete" without actually doing anything. |
Any progress with this. I'm currently able to use node-irsdk with Electron 4.x and NodeJS 12 if I run electron-rebuild. Would be nice if it worked with 5.x This is the error I get with Electron 5
|
I think @sabifa confirmed it works with v5 now? The issue is that prebuilt binary is wrong, as described in that prebuild-issue. Ie. if you want to use v5, you have to compile it yourself: https://electronjs.org/docs/tutorial/using-native-node-modules You probably has to somehow force rebuilding because provided binary doesnt work. |
I can't confirm it right now as I'm on vacation but I think I didn't try electron v5 yet. Will do that when I'm back home and report back. |
if this is of any help, i tried to get it to work on electron v6.0.1 together with electron-rebuild and so far it works just fine. You do have to manually rebuild using electron-rebuild. this is the boilerplate i used: |
@mike1233 can you please provide some help with this? I checked out this quick start, run electron rebuild and tried to install node-irsdk, but still getting my old error message ("prebuild-install" not installed, and some python errors) Would be really nice! |
I've successfully rebuilt it for Electron ^6.1. Could not make it work for Electron v7 tho. All I did was this:
and
|
can we have this fixed for electron 7? |
So I tried it again today and I am also able to rebuild the package for Electron 6.1.5, Electron 7.x gives me an error. Make sure to run the rebuild command already mentioned by @raicem |
Any news on that issue? Does it work again or is the prebuild still failing? |
Hey guys. Having the same error. Any news? |
Afaik electron 6 is the latest working version |
Hey, I managed to make it work under Electron 8.x In IrSdkBindingHelpers.cpp I added the following lines starting from line 49:
Also added the context as the first parameter on line 54:
After this yarn compiled the module without errors and it seems to be working. However when running the application the following warnings are present: So I would consider this as a quick and dirty fix. Unfortunately my knowledge of connecting cpp code to node is very limited to move forward with this. |
I got it working a couple of weeks ago. |
I am doing my first steps with electron and node-irsdk and I keep getting this error on "npm start" after installing und using node-irsdk: Can someone walk me through this?
edit: found out that electron-rebuild could potentially fix this issue. Unfortunately I am only receiving errors when trying to rebuild node-irsdk (for example rebuilding bcrypt works fine).
SOLUTION:
|
Did you even read at all? Sorry to say, but you literally seem to comment underneath the last answer, where the fix for rebuilding is posted. |
Thanks for your reply. Yes, I read all, but it seems that I might have missed some information there. I will give it a shot later today or tomorrow and report. Sorry for the inconvenience. |
Hi Kevin, just take a look at #86 (comment). Hope it helps! |
Thank you @martinguder & @heimdallexus - I edited my initial comment to add the solution to make it a little easier for other people with the same issue. The mentioned solution works fine. Sorry that I did not read carefully enough it seems. |
Thanks. Sorry for being a bit harshly! |
apihlaja#86 Based on findings of @heimdallexus and @martinguder. Make sure to rebuild your project.
package.json has only node.js version defined at the moment. But Electron binaries are available too. Should figure out which versions of Electron actually work.
The text was updated successfully, but these errors were encountered: