Error when used with Electron
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?
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"
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 :)
@jellohouse what's version of electron what you use? maybe this package build for arm64 architecture. isn't architecture of electron x86_64?
please test file node_modules/electron/dist/Electron.app/Contents/MacOS/Electron with terminal on project directory
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?
ok.
and try file node_modules/abletonlink/build/Rel ease/abletonlink.node too.
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?
I think you might just have to update your node-gyp to latest and it would do it automatically: https://github.com/nodejs/node-gyp/issues/1764
Also see this https://github.com/nodejs/node-gyp/issues/2391#issuecomment-1081750694
Hey @2bbb any updates or thoughts on this?
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.
I published 0.2.0-beta.0 with update versions of dependencies.
please test with npm i [email protected]!
maybe this problem was solved. if there is some problems, then please Reopen.