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

Error when used with Electron #17

Closed
jellohouse opened this issue Aug 25, 2022 · 13 comments
Closed

Error when used with Electron #17

jellohouse opened this issue Aug 25, 2022 · 13 comments

Comments

@jellohouse
Copy link

Hey,

I tried importing the abletonlink module in my Electron App.
But I'm getting this error:
TypeError: exists is not a function

It seems to be caused by the "bindings" node module dependency.

Any ideas on how to fix or approach this?

@jellohouse
Copy link
Author

Also just tried importing the library in the main electron process (instead of the renderer),
But this gives me an error that the architecture is incompatible: "has x86_64 needs arm64e"

@jellohouse
Copy link
Author

However I also just tested this example app https://github.com/2bbb/node-abletonlink-example and it works properly...

If anyone has any suggestions please let me know :)

@2bbb
Copy link
Owner

2bbb commented Aug 30, 2022

@jellohouse
what's version of electron what you use?
maybe this package build for arm64 architecture.
isn't architecture of electron x86_64?

@2bbb
Copy link
Owner

2bbb commented Aug 30, 2022

please test file node_modules/electron/dist/Electron.app/Contents/MacOS/Electron with terminal on project directory

@jellohouse
Copy link
Author

jellohouse commented Aug 30, 2022

Hi @2bbb !

I'm using "electron": "^19.0.8"

Testing the file node_modules/electron/dist/Electron.app/Contents/MacOS/Electron in terminal I got

node_modules/electron/dist/Electron.app/Contents/MacOS/Electron: Mach-O 64-bit executable arm64

Seems like it is arm64.
I think because I have mac m1 which is arm based cpu...

I guess that is the problem.. but still not sure how I could solve it. Any ideas?

@2bbb
Copy link
Owner

2bbb commented Aug 30, 2022

ok.
and try file node_modules/abletonlink/build/Rel ease/abletonlink.node too.

@jellohouse
Copy link
Author

Ok so file node_modules/abletonlink/build/Release/abletonlink.node gives me:

node_modules/abletonlink/build/Release/abletonlink.node: Mach-O 64-bit bundle x86_64

So yes this module is compiled for x86_64 architecture.

I'm not too familiar with node-gyp and stuff, but I think there must be away you can compile builds for both arm64 and x86_64 architecture. This would be very helpful for people with m1 macs.

Do you think it is possible?
If so any chance you could make a new release that can have this?

@jellohouse
Copy link
Author

jellohouse commented Aug 30, 2022

I think you might just have to update your node-gyp to latest and it would do it automatically:
nodejs/node-gyp#1764

@jellohouse
Copy link
Author

Also see this nodejs/node-gyp#2391 (comment)

@jellohouse
Copy link
Author

Hey @2bbb any updates or thoughts on this?

@2bbb
Copy link
Owner

2bbb commented Jun 15, 2023

on my env, file node_modules/abletonlink/build/Release/abletonlink.node returns Mach-O 64-bit bundle arm64
I don't know why your envs got x86_64 binary.

@2bbb
Copy link
Owner

2bbb commented Jun 15, 2023

I published 0.2.0-beta.0 with update versions of dependencies.
please test with npm i abletonlink@0.2.0-beta.0!

@2bbb
Copy link
Owner

2bbb commented Jul 12, 2023

maybe this problem was solved.
if there is some problems, then please Reopen.

@2bbb 2bbb closed this as completed Jul 12, 2023
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

2 participants