npx create-react-app
executes create-react-app
binary, and create-react-app
uses yarn
to create your project (if yarn is installed). that’s why you can see yarn.lock
and also why yarn-start
works.
Difference between
npx create-react-app
andyarn create react-app
They both executes create-react-app
binary. create-react-app
is the one who decides whether it wants to create the project with yarn or not. to use npm
in create-react-app
, use --use-npm
flag (no matter you execute create-react-app
with npx
or yarn
or directly
, you should set it if you want it to use npm
.):
create-react-app my-project --use-npm