環境說明 macOS 13.5 % sw_vers ProductName: macOS ProductVersion: 13.5 BuildVersion: 22G74 Brew % brew --version Homebrew 4.1.2-33-gc531a35 安裝 安裝 nvm 使用 br ...
環境說明
macOS 13.5
% sw_vers
ProductName: macOS
ProductVersion: 13.5
BuildVersion: 22G74
Brew
% brew --version
Homebrew 4.1.2-33-gc531a35
安裝
安裝 nvm
使用 brew
安裝比較方便,更新一下 Homebrew
並安裝
% brew update
% brew install nvm
...
...
...
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.
Type `nvm help` for further information.
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary