Replies: 1 comment
-
yeah, this is just too much work, I'm sticking with yarn 1 in the meantime. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm trying to combine create-react-app with yarn 2.
I'm using Yarn 2 according to its manual (https://yarnpkg.com/getting-started/install). I had installed Yarn v1 globally (
npm install -g yarn
) previously. Now I create a project directory, and install Yarn 2 there (yarn set version berry
).Then I try to create-react-app. The yarn manual uses the
dlx
command for this to bootstrap create-react-app, but they specify the folder name. That doesn't make any sense, having the instructions, described above, because then I will get a project folder inside my existing folder with Yarn installation. So I tryyarn dlx create-react-app .
The command doesn't work, it complains about the existing.yarn
and.yarnrc.yml
. Of course I have these with a per-project Yarn installation, moreover I want to reuse them further. This error doesn't make sense either, since create-react-app is supposed to add the necessary packages, not to rewrite the whole yarn cache.There are advices in the web to use Yarn 1 to run create-react-app, then to delete
node_modules
manually, then to install Yarn 2 inside the created project directory, then to install the packages back with Yarn 2 (yarn install
). This way seems to be too twisted to start a project every time thusly. The tools are being designed to simplify the life, not otherwise.Please, how can I make create-react-app cooperate with a local yarn 2 installation?
Beta Was this translation helpful? Give feedback.
All reactions