47

I recently installed yarn on my machine but was using npm before. For my current project in React I want to use npm again.

However, if I run create-react-app it is built with yarn.

How can I switch so that it is created with npm?

tk421
  • 5,775
  • 6
  • 23
  • 34
Oliver
  • 1,181
  • 2
  • 12
  • 30

2 Answers2

99

You can use the --use-npm flag:

create-react-app my-project --use-npm
Tholle
  • 108,070
  • 19
  • 198
  • 189
35

If it's an existing project you can just remove yarn.lock and continue using it with npm.

Aliaksandr Sushkevich
  • 11,550
  • 7
  • 37
  • 44