再天朝上国使用互联网经常会出现网络问题,此时需要特殊手段来进行配置,以实现正常使用
[!tips] 因为使用的是
clash
所以默认的端口为7890
,有需要自行换
npm config set proxy http://127.0.0.1:7890
npm config set https-proxy http://127.0.0.1:7890
[!tips] 切换源后会导致各种奇怪的问题.
不建议使用第三方源或者http源
配置http源
npm config set registry=http://registry.npmjs.org
configName 为配置项的名称
npm config delete [configName]
#d
删除镜像源配置
npm config delete registry
yarn config set proxy http://127.0.0.1:7890
yarn config set https-proxy http://127.0.0.1:7890
set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890