You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装MUI Toolpad时出现ETIMEDOUT错误求助

解决npm安装Node模块时的ETIMEDOUT网络错误

针对你遇到的安装任何Node模块都提示ETIMEDOUT网络错误的问题,可按以下步骤排查解决:

1. 基础网络检查

  • 测试能否正常访问npm官方源:运行命令 curl https://registry.npmjs.org,若无法返回JSON格式内容,说明当前网络无法连接npm服务器,可尝试切换网络(比如改用手机热点)。
  • 检查防火墙或杀毒软件是否限制了npm的网络请求,暂时关闭相关软件后重试安装。

2. 代理配置调整(若处于代理环境)

如果你的网络需要通过代理访问外部服务,按以下方式配置npm:

  • 设置代理地址:
    npm config set proxy http://你的代理地址:端口号
    npm config set https-proxy http://你的代理地址:端口号
    
  • 若代理需要账号密码认证:
    npm config set proxy http://用户名:密码@你的代理地址:端口号
    npm config set https-proxy http://用户名:密码@你的代理地址:端口号
    
  • 验证代理配置是否生效:
    npm config get proxy
    npm config get https-proxy
    
  • 无需代理时,清空配置:
    npm config delete proxy
    npm config delete https-proxy
    

3. 切换npm镜像源

如果官方源访问不稳定,可切换到国内镜像:

  • 切换至淘宝镜像:
    npm config set registry https://registry.npmmirror.com/
    
  • 验证镜像设置:
    npm config get registry
    
  • 后续如需恢复官方源,运行:
    npm config set registry https://registry.npmjs.org/
    

4. 延长npm超时时间

网络较慢时,可适当延长npm的请求超时时间:

npm config set timeout 60000

5. 清除npm缓存后重试

缓存异常也可能导致安装失败,清理缓存后重新尝试:

npm cache clean --force
npx create-toolpad-app@latest my-toolpad-app

内容的提问来源于stack exchange,提问作者Yash Parekh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 22:25:12