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

Create React App无报错仅超时无法运行,尝试多种方案无效如何解决?

当前Node版本为v17.0.0输入图片描述。我已尝试包含LTS版本在内的多个Node版本,等待数分钟后Create React App仍无法正常运行。我已重置WiFi路由器排除网络问题,同时重置电脑并重新安装Node.js后重试,故障依旧存在,请问该如何修复此问题?

修复方案
  • 清理npm全局缓存:执行命令 npm cache clean --force
  • 卸载全局安装的旧版Create React App,避免版本冲突:
    执行命令 npm uninstall -g create-react-app
    完成后直接调用最新版本初始化项目:npx create-react-app@latest 你的项目名
  • 临时切换国内npm源执行初始化,排除官方源连通性波动问题:
    执行命令 npx create-react-app 你的项目名 --registry https://registry.npmmirror.com
  • 检查项目存放路径,不要包含中文、空格、特殊符号、emoji等字符,使用纯英文路径重试
  • 更换包管理工具尝试初始化:
    使用yarn:yarn create react-app 你的项目名
    使用pnpm:pnpm create react-app 你的项目名
  • 如上述操作均无效,可手动初始化React项目:
    1. 新建纯英文名称的空白文件夹,进入文件夹后执行 npm init -y 初始化package.json
    2. 执行 npm install react react-dom react-scripts 安装核心依赖
    3. 打开package.json文件,在scripts字段中新增如下配置:
      "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
      }
      
    4. 分别创建public/index.html入口HTML文件、src/index.js入口JS文件,完成后即可执行npm start启动项目

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.29 04:48:00