Open hjoshi123 opened 3 years ago
I think this may be a duplicate of #2350, somewhat. I don’t know how arch
works, but presumably it doesn’t inherit the PATH from the invoking shell if that’s the error message you’re getting. If so there’s nothing nvm can really do about that.
@ljharb I am not sure if problem of arch
as this command arch -x86_64 pyenv --version
is resolving properly. I am not sure what is the problem though as in why its not getting the path for nvm.
pyenv
is a binary, nvm
is a sourced shell function, so nvm.sh
needs to be sourced to make it available.
nvm is a sourced shell function, so nvm.sh needs to be sourced to make it available.
I tried doing arch -x86_64 source ~/.nvm/nvm.sh
but it gives error "can't find source in PATH". Seems then it doesn't work
Finally what worked for me is duplicating Terminal app, selecting "Open using Rosetta" in get info and then running nvm commands through the duplicated terminal.
Edit: It's been a year, I ran into this problem now, found this thread on Google, and realized my own comment above just helped me lol.
Operating system and version:
Mac OS v11.1 Big Sur Processor: M1
nvm debug
output:nvm ls
output:How did you install
nvm
?Install script in readme
What steps did you perform?
arch -x86_64 nvm install lts/fermium
to install latest lts.What happened?
It returns arch: can't find nvm in PATH. This shouldnt happen as nvm is in the path. Somehow with the prefix of Rosetta it doesnt work. Even though if you open the iTerm in Rosetta and install it works.
What did you expect to happen?
nvm should take the prefix and install the node version under rosetta instead of restarting the terminal under Rosetta.
Is there anything in any of your profile files that modifies the
PATH
?No