1.官网下载node.js安装包,安装node.js的同时npm也会被安装
mac安装node.js
2.傻瓜式安装,一直到结束
3.安装完成后node -v或 npm -v 会报错command not found,这是因为path没有配置好
4. 打开终端:输入:touch ~/.bash_profilemac安装node.js
5. 然后输入open -t ~/.bash_profile会打开一个文本框,在第一行输入export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
mac安装node.js
mac安装node.js
6.command + s保存文件

7.在终端中输入source .bash_profile执行保存的文件
mac安装node.js
8.这时在终端中输入node -v 或npm -v就能出现版本号了
mac安装node.js

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-08-12
  • 2021-11-03
  • 2022-12-23
猜你喜欢
  • 2021-04-08
  • 2022-02-02
  • 2021-06-30
  • 2022-12-23
  • 2021-09-18
  • 2021-11-01
相关资源
相似解决方案