fnm icon indicating copy to clipboard operation
fnm copied to clipboard

How to install same versions of different arch ?

Open MatteoGauthier opened this issue 2 years ago • 3 comments

Hey, love this project, it's so simple to use !

I wanted to test the two architecture with the same version. I tried fnm install --lts --arch x64 but

fnm install --lts --arch x64

Installing Node v18.16.0 (x64)
warning: Version already installed at "/Users/matteogauthier/Library/Application Support/fnm/node-versions/v18.16.0"

How can I install the exact same version with a different arch ?

MatteoGauthier avatar Jun 03 '23 09:06 MatteoGauthier

I specifically recall deciding to leave directory names alone when implementing arch support to keep scope light and since I couldn't really think of a good use case since its very rare for an environment's arch to change (and we begin to beg the question about what the default arch should be on a given machine when searching).

But probably not too bad to add? Leave whether to Schniz. Can you give a few details why you're looking to install different architectures on the same machine at the same time? If you had both installed at the same time, which one would you expect to be loaded by default when switching to that version? Why?

In the meantime, you can checkout --fnm-dir option of fnm env as a potential route for workarounds.

pckilgore avatar Jul 05 '23 21:07 pckilgore

pub enum Arch {
    X86,
    X64,
    Arm64,
    Armv7l,
    Ppc64le,
    Ppc64,
    S390x,
}

if someone need arch version name, pleace check this file https://github.com/Schniz/fnm/blob/595043f7441420e60a6ef548a560fbdd872e7533/src/arch.rs#L4-L12

radiorz avatar Sep 11 '23 07:09 radiorz