安装
根据菜鸟教程进行下载安装包并安装
Node.js 安装配置 | 菜鸟教程 (runoob.com)
安装后环境变量会自动配置,用cmd打开黑窗口查看是否配置成功
输入命令:path 查看配置
输入命令:node --version
命令配置
注:直接用 npm install -g cnpm -registry=https://registry.npm.taobao.org 命令会出现无法安装的错误。
#设置淘宝镜像源
npm config set registry https://registry.npm.taobao.org/
#设置官方镜像源
npm config set registry https://registry.npmjs.org
#查看镜像使用状态
npm config get registry
#清除缓存
npm cache clean --force
#切换新源
npm config set registry https://registry.npmmirror.com
#查看源是否设置成功
npm config get registry
#安装
npm install -g cnpm
#查看cnvm 命令:cnpm -v
#输入node:成功进入命令行模式