Closed jamesb93 closed 3 years ago
I don't have an M1 Mac to test this. Do you want to send me PR?
No problem, I can do that later. Does changing this line affect Linux users though who would want the arm64 binaries if thats their arch?
I think we should just abort with an error until builds are available.
Hmm okay. If I made a PR that warns the user but goes ahead accordingly and doesn't mess with Linux would that be acceptable?
Do arm64 builds work fine on the M1 chip? I think they don't, no? hence my desire to abort.
What problem did you face exactly, and what did you expect to happen? Thank you!
It's not about whether or not the builds work - its the fact that there simply are none.
https://nodejs.org/dist/latest/ has only Darwin x64 builds. You can use these without issue on Apple Silicon, its just that nvm.fish is currently looking for a binary download that doesn't exist.
We should not fail, and install the ones that work then. Make sense?
There's a contradiction in what you said, though:
its the fact that there simply are none
[...] has only Darwin x64 builds. You can use these without issue on Apple Silicon
So, there are no builds, but they work? Which one is it? 😂
There are no M1 builds. There are Rosetta emulated builds which “work” but not truly natively. In other words, it’s not a binary choice, so there does not exist a simple answer to your question.
Got it. We can download the darwin x64 builds or abort with an error message. What do you think?
Hey! Sorry, i've been quite overwhelmed. If I get to this it won't be for a little while.
I'm setting up my new M1 and ran into this problem. @jamesb93's solution worked for me. I'm happy to open a PR but, since it'd only be a temporary fix (until nodejs.org offers builds or until #142 is merged, assuming that works for M1), would you still want to go ahead with it?
It may be a while before #142 is merged. Sure, send me a PR and we can continue the discussion in there. 🙏
Hi there,
Currently there are no Darwin arm64 builds of node on the official nodejs website. This causes the string formation to fail.
A quick solution is to change lines https://github.com/jorgebucaran/nvm.fish/blob/476a9e63d9bfb07971469462c62cbd77fb6997d4/functions/nvm.fish#L63 to:
This may cause some unforeseen issues, for example you can get arm64 builds for Linux in which case that combination would need to be tested for as well.
Anyway this may be worth an official fix.