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

Fails to Install on Apple Silicon M1 Macs #215

Closed
chrisspiegl opened this issue Dec 21, 2021 · 5 comments
Closed

Fails to Install on Apple Silicon M1 Macs #215

chrisspiegl opened this issue Dec 21, 2021 · 5 comments

Comments

@chrisspiegl
Copy link

Hello, I just tried using one of my projects which includes easymidi and by extension node-midi on my new M1 MacBook and it fails to install.

I was able to narrow it down to the dependency on opencv4nodejs-prebuilt and was wondering if it may be possible to work around this issue? Possibly work with an alternative library?

I also requested support for M1 on the opencv4nodejs-prebuilt repository: https://github.com/nut-tree/opencv4nodejs/issues/14

Any help would be appreciated.

I am trying to not have to run Node.JS inside a Rosetta Container and get this project up and running natively.

Looking forward to hopefully finding a solution together.

@chrisspiegl
Copy link
Author

Sorry, I put in some further investigation and found out that this was not at all the fault of this package but a different dependency. If I could I would delete this issue but since that's impossible… I'll be closing it.

@alana314
Copy link

alana314 commented Nov 6, 2023

I had a world of pain getting this installed and working with electron, so I wanted to share what finally worked (and stopped the NODE_MODULE_VERSION and mach-o x64 errors):

npm install midi --build-from-source --target_arch=arm64 --fallback-to-build
npm install --save-dev @electron/rebuild
./node_modules/.bin/electron-rebuild -f --arch=arm64

@Julusian
Copy link

Julusian commented Nov 6, 2023

This project looks to not be maintained anymore. Instead you can use my fork @julusian/midi. It includes prebuilt binaries for common platforms, avoiding the need to compile it locally in almost all cases.
See #228 for more details on the changes.

@alana314
Copy link

alana314 commented Nov 6, 2023

@Julusian thanks! I did still have to ./node_modules/.bin/electron-rebuild -f --arch=arm64 with your package or it would by default try and use a mach-o x86 build.

@Julusian
Copy link

Julusian commented Nov 6, 2023

Oh right yeah. I forgot that electron/rebuild#1055 is still an 'issue'.
It shouldn't need to rebuild it, but electron-rebuild isnt smart enough to realise that, so it does it anyway and I guess sometimes gets it wrong?

In my electron projects I don't have any dependencies which need rebuilding, so I have turned rebuilding off to avoid these issues

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

3 participants