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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhaolaoda2012/article/details/70053264

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

$ 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

猜你喜欢

转载自blog.csdn.net/zhaolaoda2012/article/details/70053264