A
A
alex_Void2022-01-23 15:19:43
React
alex_Void, 2022-01-23 15:19:43

How to correctly create a react application with the yarn create react-app command, if the yarn version is 3+?

Should I use yarn version 3 to create a new react application with the create react-app command? Maybe there is some correct sequence so that different errors do not fall. As of yarn 1.22, there doesn't seem to be that. Had to add .yarnrc.yml:

packageExtensions:
  [email protected]*:
    dependencies:
      "@babel/plugin-proposal-private-property-in-object": "*"

Then there was something about Failed to load config "react" to extend from - sort of related to eslint

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cherkalexander, 2022-02-21
@cherkalexander

Whether or not to use yarn3 depends on your requirements. I'm getting into yarn 3 right now because the speed of installing packages for yarn leaves a lot to be desired.
The code you provided did not work for me, to fix the error, I had to add it "eslint-config-react-app": "^6.0.0"to `devDependencies`, as recommended in this issue . You can read the article on comparing package managers .
If it's not important for you to use pnpLinker, then you can just use it nodeLinker: node-modulesin .yarnrc.yml.
The following configuration option will also work:

nodeLinker: pnp
pnpFallbackMode: all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question