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

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

$ 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

你可能感兴趣的:(Mac)