使用 yarn dlx create-react-app 创建 React 应用程序后,第一次按 yarn start 启动它时,出现错误

问题描述

使用纱线 2 (yarnpkg/Berry)

  • 在终端
% yarn set version Berry
% yarn dlx create-react-app apple
% cd apple
% yarn start
  • 在浏览器中
Failed to compile
Failed to load config "react-app" to extend from.
Referenced from: D:\Projects\apple\package.json
This error occurred during the build time and cannot be dismissed.

我该如何解决这个问题?

ps。 yarn dlx create-next-app 工作正常。只有 CRA 有问题

解决方法

yarn start 添加步骤 yarn add eslint-create-react-app 之前为我解决了这个问题