Просмотр исходного кода

添加npm代理需要注意事项以及移除配置

kindring 1 год назад
Родитель
Сommit
b92016816d
1 измененных файлов с 18 добавлено и 0 удалено
  1. 18 0
      环境配置相关/网络代理.md

+ 18 - 0
环境配置相关/网络代理.md

@@ -9,6 +9,24 @@
 npm config set proxy http://127.0.0.1:7890
 npm config set proxy http://127.0.0.1:7890
 npm config set https-proxy http://127.0.0.1:7890
 npm config set https-proxy http://127.0.0.1:7890
 ```
 ```
+#### 更换镜像源
+> [!tips] 切换源后会导致各种奇怪的问题.   
+> 不建议使用第三方源或者http源
+
+配置http源
+```shell
+npm config set registry=http://registry.npmjs.org
+```
+
+#### 移除配置
+> configName 为配置项的名称
+
+npm config delete [configName]  
+
+`#d` 删除镜像源配置
+```shell
+npm config delete registry
+```
 
 
 ### yarn 代理设置
 ### yarn 代理设置
 ```shell
 ```shell