Skip to content

安装node.js与卸载

下载并安装Node.js:在 https://nodejs.org/en/ 上下载最新的Node.js安装程序,双击运行,按照提示一步步安装即可。

  • 卸载node

配置环境变量

  • 检测是否安装成功
sh
node -v
npm -v
node -v
npm -v

npm淘宝镜像设置

  • 置淘宝镜像源
sh
npm config set registry https://registry.npmmirror.com
npm config set registry https://registry.npmmirror.com
  • 查看镜像使用状态
sh
npm config get registry
npm config get registry

如果返回https://registry.npmmirror.com,说明配置的是淘宝镜像。

  • 恢复官方镜像源
sh
npm config set registry https://registry.npmjs.org
npm config set registry https://registry.npmjs.org