2

使用纱线 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.

我该如何解决这个问题?

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

4

2 回答 2

0

create-react-app 目前已经包含 eslint-config-react-app。所以补充说导致了冲突

Plugin "react" was conflicted between "package.json » eslint-config-react-app » C:\Users\bhalb\programming\activity-tracker\.yarn\__virtual__\eslint-config-react-app-virtual-8e12459b5a\0\cache\eslint-config-react-app-npm-7.0.0-1ad319c3be-dac130cfcb.zip\node_modules\eslint-config-react-app\base.js" and "BaseConfig » C:\Users\bhalb\programming\activity-tracker\.yarn\__virtual__\eslint-config-react-app-virtual-6f6769fb06\0\cache\eslint-config-react-app-npm-7.0.0-1ad319c3be-dac130cfcb.zip\node_modules\eslint-config-react-app\base.js".

nodeLinker: node-modules我的解决方案是通过设置禁用即插即用.yarnrc.yml

于 2021-12-17T06:30:41.677 回答
-1

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

于 2021-04-15T09:40:52.653 回答