Node.js/npm/代理:修订间差异
来自康健生活
| (未显示同一用户的1个中间版本) | |||
| 第3行: | 第3行: | ||
{{Shc_out|<syntaxhighlight lang="bash"> | {{Shc_out|<syntaxhighlight lang="bash"> | ||
npm config get proxy</syntaxhighlight>|<syntaxhighlight lang="bash">null | npm config get proxy</syntaxhighlight>|<syntaxhighlight lang="bash">null | ||
</syntaxhighlight>|$|/home/ | </syntaxhighlight>|$|/home/kwy}} | ||
设置代理 | |||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
npm config set proxy http:// | npm config set proxy http://192.168.51.34:808 | ||
npm | npm config set https-proxy http://192.168.51.34:808</syntaxhighlight>|$}} | ||
== yarn == | == yarn == | ||
2025年7月29日 (二) 15:16的最新版本
npm
查看代理
[jian@kang /home/kwy]$
npm config get proxy
null
设置代理
npm config set proxy http://192.168.51.34:808
npm config set https-proxy http://192.168.51.34:808
yarn
查看代理配置
/home/kwy
yarn config list | grep 'proxy'
设置代理
/home/kwy
yarn config set proxy http://192.168.51.34:808 \
&& yarn config set https-proxy http://192.168.51.34:808
删除代理
/home/kwy
yarn config delete proxy \
&& yarn config delete https-proxy
No categories