節後餘生,開工發現運行 npm run dev失敗html
而後運行其餘命令顯示:node
Error: You have not agreed to the Xcode license. Please resolve this by running:npm
sudo xcodebuild -licensexcode
-bash: /nvm.sh: No such file or directorybash
懷疑是xcode的問題,ui
首先按照提示:sudo xcodebuild -licensethis
而後會顯示xcode的參考贊成證書,直接q,而後agree贊成;spa
再次運行npm 仍是顯示command not found.net
因爲以前 node是正常的,因此只是在 使~/.bash_profile生效便可: source ~/.bash_profilecode