Blame

e6644d Qwas 2024-05-01 23:50:55 1
# Node.js 代理配置
6c8853 Qwas 2024-05-01 10:41:26 2
07f235 Qwas 2024-05-01 23:47:03 3
## npm 代理配置
6c8853 Qwas 2024-05-01 10:41:26 4
d14d54 Qwas 2024-10-16 10:04:30 5
```sh
6
npm config set proxy http://127.0.0.1:7890 # 设置代理
7
```
8
9
## 设置镜像
10
6c8853 Qwas 2024-05-01 10:41:26 11
设置
12
13
```sh
14
npm config set registry https://registry.npmmirror.com/
15
yarn config set registry https://registry.npmmirror.com/
16
pnpm config set registry https://registry.npmmirror.com/
17
```
18
19
查看
20
21
```sh
22
npm config get registry
23
yarn config get registry
24
pnpm config get registry
25
```
26
d14d54 Qwas 2024-10-16 10:04:30 27
## 常用二进制包镜像设置
28
29
```sh
30
npm set sass_binary_site https://cdn.npmmirror.com/binaries/node-sass # node-sass 二进制包镜像
31
npm set chromedriver_cdnurl https://cdn.npmmirror.com/binaries/chromedriver # chromedriver 二进制包镜像
32
npm set operadriver_cdnurl https://cdn.npmmirror.com/binaries/operadriver # operadriver 二进制包镜像
33
npm set phantomjs_cdnurl https://cdn.npmmirror.com/binaries/phantomjs # phantomjs 二进制包镜像
34
npm set fse_binary_host_mirror https://cdn.npmmirror.com/binaries/fsevents # fsevents 二进制包
35
npm set electron_mirror https://cdn.npmmirror.com/binaries/electron/ # electron 二进制包镜像
36
```
37
38
### node-sass
6c8853 Qwas 2024-05-01 10:41:26 39
40
```sh
07f235 Qwas 2024-05-01 23:47:03 41
npm config set sass_binary_site https://cdn.npmmirror.com/binaries/node-sass/
42
yarn config set sass_binary_site https://cdn.npmmirror.com/binaries/node-sass/
43
pnpm config set sass_binary_site https://cdn.npmmirror.com/binaries/node-sass/
6c8853 Qwas 2024-05-01 10:41:26 44
```