Search code examples
create-react-appyarnpkgyarn-v2

How to use Create React App using Yarn 2?


In yarn v1 we initialize create react app using yarn create react-app my-app. How to initialize the same in yan v2.

The above command gives the error

Usage Error: No project found in <<directory>>

$ yarn run <scriptName> ...

Solution

  • You can use yarn dlx create-react-app my-app. It will work. There are a lot of changes came with the yarn version2 update. check this also for additional info: https://dev.to/arcanis/introducing-yarn-2-4eh1