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

来源:互联网 发布:矩阵的阶数是什么 编辑:程序博客网 时间:2024/06/16 05:38

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

$ 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
3 0
原创粉丝点击