How to make "npx create-react-app" using yarn instead of npm?

Viewed 25
1 Answers

to select the package manager you have to run either via npx or yarn (https://create-react-app.dev/docs/getting-started/)

# Run this to use npm
npx create-react-app my-app
# Or run this to use yarn
yarn create react-app my-app

Alternatively if you want to stick with npx:

npx create-react-app --use-yarn 
Related