关于 -bash: npm: command not found

1、npm: command not found

  节后余生,开工发现运行 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

2、其余缘由,多是$PATH配置问题

  参照:node.js控制和nvm失效问题

相关文章
相关标签/搜索