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

yarn启动报错“react-scripts:start” exited with 1 如何解决

Yarn启动报错修复方案
  • 修正react-scripts:start命令的错误语法
    你当前配置中"react-scripts:start": "timeout <5> && react-scripts start"里的<5>是示例占位符,不能直接放到实际配置中使用,尖括号需要删除。如果不需要延时逻辑可以直接去掉timeout部分,修改为:
    "react-scripts:start": "react-scripts start",
    
    如果你确实需要等待5秒再启动React服务适配CSS编译进度,Mac/Linux环境可以修改为:
    "react-scripts:start": "sleep 5 && react-scripts start",
    
    Windows环境可以修改为:
    "react-scripts:start": "timeout /t 5 /nobreak && react-scripts start",
    
  • 确认npm-run-all依赖已安装
    配置中用到的run-p、run-s命令是npm-run-all包提供的能力,需要确保该依赖已经安装到项目开发依赖中,执行以下命令安装即可:
    yarn add npm-run-all -D
    
  • 测试启动
    完成以上修改后重新执行yarn start,即可正常启动项目。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.10.06 12:15:04