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

[not bug] Installing problem in mac arm64(m1, apple silicon) #369

Closed
gucheen opened this issue Jan 19, 2021 · 11 comments
Closed

[not bug] Installing problem in mac arm64(m1, apple silicon) #369

gucheen opened this issue Jan 19, 2021 · 11 comments

Comments

@gucheen
Copy link
Contributor

gucheen commented Jan 19, 2021

not a bug but just some notice.

Since nodejs.org hasn't release a darwin-arm64 binary, fnm cannot download the target binary line https://nodejs.org/dist/latest/node-v15.6.0-darwin-arm64.tar.xz.

And also, node.js currently only support apple silicon after version v15.x, if no further updates on lower versions, some testing will be failed(like install node v12.x).

refer: nodejs/build#2474
related pr: #368

@Schniz
Copy link
Owner

Schniz commented Jan 19, 2021

Woah. what would other package managers do? install from source? That would be a waste of time for most people.

@7rulnik
Copy link

7rulnik commented Jan 19, 2021

@Schniz for example, nvm will compile it from source, yeah. As I understand it's just a temporary solution. Native support was introduced in 15.3.0.

@7rulnik
Copy link

7rulnik commented Jan 19, 2021

And sorry for off-topic, but can you take a look at Homebrew/homebrew-core#68301?

@gucheen
Copy link
Contributor Author

gucheen commented Jan 20, 2021

@Schniz fallback to a x64 version of nodejs would be a choice. x64 nodejs runs well through Rosetta.
Maybe offer an option to select target arch like https://github.com/tj/n

@ole3021
Copy link

ole3021 commented Jan 20, 2021

I use n currently to solve the node env management problem. but fnm is my favorite one. so hopefully there will have a solution that works for me. Thanks in advance.

@Schniz
Copy link
Owner

Schniz commented Jan 21, 2021

And sorry for off-topic, but can you take a look at Homebrew/homebrew-core#68301?

@7rulnik I will release a new version soon with #368 that should possible fix this issue. That being said, I am not sure about fnm for building from source, so I don't know how it would help. Still need to consider if we want to allow building from source, and if we do, understand how to do that 😄

@dvcrn
Copy link

dvcrn commented Feb 27, 2021

Woah. what would other package managers do? install from source? That would be a waste of time for most people.

I found this problem looking for something that can help me out of slow nvm load speeds. Does this project have no option to compile from source? Another M1 user here and I quite like that NVM can just compile node when no bin is available

@Schniz
Copy link
Owner

Schniz commented Mar 1, 2021

Does this project have no option to compile from source?

Right now it does not. I would consider accepting a contribution that adds this feature (it feels like a massive maintaining burden, but maybe I'm afraid for nothing). Anyway, in my current workflow, I don't find myself in need of compiling for source, and it does not sound very interesting to build, so I don't see myself building it.

If someone wants to chime in and make fnm optionally build from source, let me know!

@gucheen
Copy link
Contributor Author

gucheen commented Mar 5, 2021

https://github.com/nodenv/node-build
Currently I use node-build to build node v15.x on my MacBook m1.
eg node-build 15.11.0 ~/.fnm/node-versions/v15.11.0/installation/ and all things work well (it takes a while to compile, though)

@Schniz
Copy link
Owner

Schniz commented Apr 4, 2021

fnm v1.24.0 now installs the x64 version which Rosetta can run. 😃

@Schniz Schniz closed this as completed Apr 4, 2021
@7rulnik
Copy link

7rulnik commented Apr 20, 2021

@Schniz node 16 just released with prebuilt binaries for darwin-arm64
https://nodejs.org/dist/v16.0.0/

As I understand it can be installed via

fnm install --arch=arm64 16

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

5 participants