Mac OX上安装node.js

这里采用的方式是,使用nvm来安装node.js版本,具体步骤如下:

1.在用户家目录新建.bash_profile文件

reeves:~ touch .bash_profile

2.运行nvm安装脚本

nvm安装脚本在nvm的github项目中就有,这里简单复制一下

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

3.使.bash_profile生效

reeves:~ source .bash_profile

这个时候再使用nvm命令就可以安装node.js了

reeves:~ nvm install stable

你可能感兴趣的:(Mac OX上安装node.js)