2

Use yarn 2 (yarnpkg/berry)

  • in terminal
% yarn set version berry
% yarn dlx create-react-app apple
% cd apple
% yarn start
  • in browser
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.

How do I solve this problem?

ps. yarn dlx create-next-app works fine. only have a problem with the CRA

2 Answers2

0

create-react-app currently includes eslint-config-react-app already. So added that led to a conflict

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".

My solution was to disable plug'n'play by setting nodeLinker: node-modules in .yarnrc.yml

bahalbach
  • 136
  • 1
  • 5
-1

Before yarn start adding the step yarn add eslint-create-react-app solved this issue for me

  • This is not an actual answer. An answer should contain explanation about the actual problem and explanation about the answer as well. what you've posted is best suited for a comment. Please read this: https://stackoverflow.com/help/how-to-answer –  Apr 15 '21 at 13:06