fnm icon indicating copy to clipboard operation
fnm copied to clipboard

Request: option to build Node from source if no prebuilt binary exists

Open mxmason opened this issue 3 years ago • 1 comments

Hi there! Thanks for building this tool!

As an independent consultant, I need to be able to run a few legacy Node versions while working other people's software. When using nvm to install a version of Node that is not prebuilt for the M1 architecture, nvm allows my machine to build Node from source and install that. I would love if this were an option in fnm as well – it would pretty much allow me to migrate away from nvm!

Perhaps this can be done if the user explicitly provides an architecture when installing a Node version? e.g.:

# installs x64 binary on m1 devices, because no prebuilt arm64 binary exists
fnm install 14
# overrides get_safe_arch and builds arm64 Node 14 from source on m1 devices
fnm install 14 --arch arm64

Thanks :)

mxmason avatar Jul 06 '21 06:07 mxmason

This is not currently something I would want to invest time in because I don't share the use case. If someone's up for it, we can discuss details prior to opening a PR 😃

Schniz avatar Jul 22 '21 09:07 Schniz