npm install 时,会提示错误:FetchError: request to https://registry.npmjs.org/@types/uglify-js failed, reason: connect ETIMEDOUT 104.16.19.35:443
这是由于访问国内访问npm的资源库地址:https://registry.npmjs.org连接超时导致。因此应将npm的资源库设置为国内的即可:
# 设置为淘宝的镜像
npm config set registry https://registry.npm.taobao.org
设置完成之后,重新执行npm即可
# 查看npm镜像地址
npm config get registry