安装node.js与卸载
下载并安装Node.js:在 https://nodejs.org/en/ 上下载最新的Node.js安装程序,双击运行,按照提示一步步安装即可。
- 卸载node
配置环境变量
- 检测是否安装成功
sh
node -v
npm -vnode -v
npm -vnpm淘宝镜像设置
- 置淘宝镜像源
sh
npm config set registry https://registry.npmmirror.comnpm config set registry https://registry.npmmirror.com- 查看镜像使用状态
sh
npm config get registrynpm config get registry如果返回https://registry.npmmirror.com,说明配置的是淘宝镜像。
- 恢复官方镜像源
sh
npm config set registry https://registry.npmjs.orgnpm config set registry https://registry.npmjs.org
liang14658fox