设置NPM/Electron国内源

作者: zengde 分类: 笔记 发布时间: 2020-10-13 07:31

Yarn设置国内镜像

yarn config set registry https://registry.npm.taobao.org
yarn config set disturl https://npm.taobao.org/dist
yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/

NPM设置国内镜像

npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

跳过二进制包下载

ELECRON_SKIP_BINARY_DOWNOAD=1 npm install

npm config set ELECRON_SKIP_BINARY_DOWNOAD 1