一、npm: command not found
節后余生,開工發現運行 npm run dev失敗
然后運行其他命令顯示:
Error: You have not agreed to the Xcode license. Please resolve this by running:
sudo xcodebuild -license
-bash: /nvm.sh: No such file or directory
懷疑是xcode的問題,
首先按照提示:sudo xcodebuild -license
然后會顯示xcode的參考同意證書,直接q,然后agree同意;
再次運行npm 還是顯示command not found
由於之前 node是正常的,所以只是在 使~/.bash_profile生效即可: source ~/.bash_profile
二、其他原因,可能是$PATH配置問題
