MAC-nodejs与npm安装报错"-bash : npm: command not found"

廉价感情. 提交于 2019-11-30 16:16:51

网上看到的解决方案:
解决方案
打开终端 执行下面的四句 命令:

$ brew update
$ brew uninstall node
$ brew install node
$ sudo brew postinstall node 
# brew error message provided this recommendation; only worked with sudo

to test that npm is working (tho appears to build an index, which not everyone may want):
意思是测试npm是否有用.

$ npm search # returns long list of packages
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!