File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ check_node_version() {
32
32
if [[ " $node_version " < " v20.0.0" ]]; then
33
33
echo " Node.js版本低于20.0.0,正在安装Node.js v20以上版本..."
34
34
install_node_v20
35
+ npm config set registry https://registry.npmmirror.com
35
36
else
36
37
echo " Node.js版本符合要求(v20以上),跳过安装。"
37
38
fi
72
73
install_yarn_and_pm2 () {
73
74
if command -v yarn > /dev/null 2>&1 ; then
74
75
echo " Yarn已安装,跳过Yarn安装。"
76
+ yarn config set registry https://registry.yarnpkg.com
75
77
else
76
78
echo " Yarn未安装,正在安装Yarn..."
77
79
nvm install-node # 安装最新版本的Node.js,自动选择大于v20的版本
78
80
nvm use default
79
81
npm install -g yarn
82
+ yarn config set registry https://registry.yarnpkg.com
80
83
if [ $? -ne 0 ]; then
81
84
echo " Yarn安装失败,请手动安装Yarn后重试。"
82
85
exit 1
@@ -531,4 +534,4 @@ while true; do
531
534
fi
532
535
break # 退出循环
533
536
fi
534
- done
537
+ done
You can’t perform that action at this time.
0 commit comments