Node.js/npm/代理:修订间差异
来自康健生活
创建页面,内容为“== proxy == 查看代理 {{Shc_out|<syntaxhighlight lang="bash"> npm config get proxy</syntaxhighlight>|<syntaxhighlight lang="bash">null </syntaxhighlight>|$|/home/kangkk}} {{shc|<syntaxhighlight lang="bash"> npm config set proxy http://127.0.0.1:1080 npm i node-sass # 下载完成后删除 http 代理 npm config delete proxy</syntaxhighlight>|$}}” |
|||
| 第1行: | 第1行: | ||
== | == npm == | ||
查看代理 | 查看代理 | ||
{{Shc_out|<syntaxhighlight lang="bash"> | {{Shc_out|<syntaxhighlight lang="bash"> | ||
| 第11行: | 第11行: | ||
# 下载完成后删除 http 代理 | # 下载完成后删除 http 代理 | ||
npm config delete proxy</syntaxhighlight>|$}} | npm config delete proxy</syntaxhighlight>|$}} | ||
== yarn == | |||
查看代理配置 | |||
{{shc|<syntaxhighlight lang="bash"> | |||
yarn config list | grep 'proxy'</syntaxhighlight>|$|/home/kwy}} | |||
2025年7月29日 (二) 15:10的版本
npm
查看代理
[jian@kang /home/kangkk]$
npm config get proxy
null
npm config set proxy http://127.0.0.1:1080
npm i node-sass
# 下载完成后删除 http 代理
npm config delete proxy
yarn
查看代理配置
/home/kwy
yarn config list | grep 'proxy'
No categories