1、理解NVM、node、NPM
2、Node.js的主要应用领域
3、什么是NPM?
NPM: Node Package Manager,node包管理器
4、Mac下安装NVM:
点击跳转(nvm项目的github地址) ,找到install script的地方,然后复制,在终端粘贴运行。
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
安装成功后,输入 nvm --version输出版本号即为安装成功。默认会自动添加环境变量,如果没有执行如下,输入nvm --version无输出
=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
于是使用vim 创建一个~/.bash_profile文件,将vim切换至insert状态后(输入i),写入所给脚本,然后:wq退出
重新启动终端,输入nvm --version会显示版本号即安装成功!!!