前端开发环境配置
安装 Node
https://nodejs.org/zh-cn/ 下载 Node LTS
2021.12.6: Node 最新 LTS 版本 16.13.1
安装 Yarn
根据 https://yarnpkg.com/getting-started/install
使用 Yarn 全局安装的命令行文件, windows 下在 %LocalAppData%\Yarn\bin, 可以添加为环境变量
npm install -g create-vite-app
镜像
手动设置镜像
npm config set registry https://registry.npmmirror.com/
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
npm config set ELECTRON_BUILDER_BINARIES_MIRROR http://npm.taobao.org/mirrors/electron-builder-binaries/
npm config set SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass/
# Yarn 1
yarn config set registry https://registry.npmmirror.com/
yarn config set disturl https://npm.taobao.org/dist
yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/
yarn config set ELECTRON_BUILDER_BINARIES_MIRROR http://npm.taobao.org/mirrors/electron-builder-binaries/
yarn config set SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass/