$ git clone https://github.com/riywo/anyenv ~/.anyenv

$ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile

$ echo 'eval "$(anyenv init -)"' >> ~/.bash_profile

$ exec $SHELL -l

 

$ anyenv install nodenv でメッセージが表示されるので、

$ anyenv install --init

 

$ anyenv install nodenv

$ exec $SHELL -l

$ nodenv (1.4.0+3.631d0b6)

 

$ nodenv install -l | less

$ nodenv install 16.3.0

$ nodenv local 16.3.0

$ node -v (v16.3.0)

$ npm -v (7.15.1)

 

参考

 

編集