请确保网络较好,个人因为网络原因折腾了好久,资源库可以设置为https://registry.npm.taobao.org/设置和查看命令如下:
npm config set registry="https://registry.npm.taobao.org/"
npm config list执行:npm cache clean --force 自此执行安装命令:npm i