1
os: macOS Sierra 10.12.6 (16G29)
terminal app: Hyper 1.3.3.1754
nvm: 0.33.2
我安裝了nvm
,根據說明,前一段時間沒有問題。最近,它和它負責的命令 - node
和npm
- 停止工作。爲什麼nvm相關命令-nvm,node,npm-停止工作?
NVM/NPM /節點找不到命令
os: macOS Sierra 10.12.6 (16G29)
terminal app: Hyper 1.3.3.1754
nvm: 0.33.2
我安裝了nvm
,根據說明,前一段時間沒有問題。最近,它和它負責的命令 - node
和npm
- 停止工作。爲什麼nvm相關命令-nvm,node,npm-停止工作?
NVM/NPM /節點找不到命令
我意識到,這種情況發生,因爲最近,我將系統默認的shell從慶典到的zsh - chsh -s /bin/zsh
- 如果不解決這是由bash
但不zsh
來源的的~/.bash_profile
內容。
的nvm安裝腳本
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
地方的適當配置文件酮如下:~/.bash_profile
,~/.zshrc
,~/.profile
,或~/.bashrc
。
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
在安裝我的時間用bash
和該位被放置在~/.bash_profile
。應對內容到~/.zshrc
得到的命令再次工作。