更新时间:2021-12-19 09:31:06
听起来好像连接速度很慢.尝试将超时从30秒增加到60秒,方法是将超时添加到您的 .npmrc
文件中:
Sounds like you have a slow connection. Try increasing the timeout from 30s to 60s by adding this to your .npmrc
file:
timeout=60000
您也可以尝试添加
prefer-offline=true
如果您想节省带宽或连接速度慢
if you are trying to save bandwidth or have a slow connection
注意:如果尚未设置 .npmrc
文件,则可以在此处创建一个文件
Note: if you don't have an .npmrc
file setup yet, you can create one here
C:\ Users \ {username} \.npmrc
〜/.npmrc
或者您可以在与项目的 package.json
文件相同的目录中创建一个文件.
Or you can create one in the same directory as your project's package.json
file.