安装windows-build-tools卡在了某一步而没有继续进程?

在powershell管理员模式里,输入 yarn global add windows-build-tools 后显示如下,卡在了某一步而没有继续进程:

img

试过输入 npm install --global windows-build-tools 后显示如下,也卡在了某一步而没有继续进程:

img

请问哪里出了问题?如何解决?请展示截图告知解决步骤,谢谢。

应该是镜像的问题,试着换成下面几个国内的镜像试试:
淘宝镜像:

npm config set registry https://registry.npmmirror.com

腾讯云镜像:

npm config set registry http://mirrors.cloud.tencent.com/npm/

华为云镜像:

npm config set registry https://mirrors.huaweicloud.com/repository/npm/