搭建前端开发环境标准步骤 安装 NVM Node.js pnpm 配置环境变量 NVM 安装 nodejs 失败 The system cannot find the file specified.
搭建前端开发环境标准步骤 安装 NVM Node.js pnpm 配置环境变量 NVM 安装 nodejs 失败 The system cannot find the file specified.1、安装 NVM1.1 下载安装 NVM国内下载地址 https://nvm.uihtm.com/注意安装目录不要带空格纯英文目录1.2、配置 NVM 国内镜像https://nvm.uihtm.com/doc/npmmirror.htmlnode_mirror: https://npmmirror.com/mirrors/node/ npm_mirror: https://npmmirror.com/mirrors/npm/1.3、nodejs 安装失败 The system cannot find the file specifiederror installing12.22.0:openC:\Users\User\AppData\Local\Temp\nvm-npm-3760300727\npm-v6.14.11.zip: The system cannotfindthefilespecified.https://nvm.uihtm.com/doc/npmmirror.html2、下载 Node.jsnvm list available#查看 nodejs 有哪些版本nvminstall22.15.0#下载 22.15.0 版本nvm use22.15.0#切换到 22.15.0 版本nvm-v#查看当前在用的 nodjs 版本nvm list#查看已安装版本nvm uninstall22.15.0#卸载 22.15.0 版本3、配置 Node.js3.1、设置淘宝镜像设置淘宝镜像 npm config set registry https://registry.npmmirror.com 验证是否生效 npm config get registry3.2、设置公司镜像可选注意公司没有的可以不设置这个npm config set xxx:registryhttp://xxx4、pnpm4.1、pnpm 是什么pnpm 是第三方的 Node.js 包管理工具比 npm 性能更好4.2、安装 pnpmnpminstall-gpnpm4.3、设置 pnpm 淘宝镜像切换淘宝镜像源 pnpm config set registry https://registry.npmmirror.com 验证是否生效 pnpm config get registry4.4、设置 pnpm 公司镜像可选注意公司没有的可以不设置这个pnpm config set xxx:registryhttp://xxx5、补充说明很多教程让修改全局包安装位置和环境变量根本不需要pnpm 是第三方的 Node.js 包管理工具比 npm 性能更好npm 设置过镜像仓库pnpm 还需要设置镜像仓库吗