1. Overview
2. Windows
2.1 pnpm
安装
1
| irm https://get.pnpm.io/ps1 | iex
|
配置
1 2
| pnpm config set registry https://registry.npmmirror.com/ pnpm config set --json tools '{\"node\":{\"channels\":{\"release\":\"https://npmmirror.com/mirrors/node/\"}}}'
|
2.2 node/npm
1 2 3
| pnpm runtime set node lts -g pnpm add -g npm npm config set registry https://registry.npmmirror.com
|
2.3 electron
1 2 3 4 5
| Add-Content -Path $PROFILE -Value @' # electron $env:ELECTRON_MIRROR = "https://npmmirror.com/mirrors/electron/" '@
|
3. Linux/WSL
3.1 pnpm
安装
1
| curl -fsSL https://get.pnpm.io | sh -
|
配置
1 2
| pnpm config set registry https://registry.npmmirror.com/ pnpm config set --json tools '{"node":{"channels":{"release":"https://npmmirror.com/mirrors/node/"}}}'
|
3.2 node/npm
1 2 3
| pnpm runtime set node lts -g pnpm add -g npm npm config set registry https://registry.npmmirror.com
|
3.3 electron
$HOME/.bashrc
1
| export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
|
$HOME/.config/fish/conf.d/electron.fish
1
| set -x ELECTRON_MIRROR "https://npmmirror.com/mirrors/electron/"
|