Oliver
Oliver

Reputation: 1181

Switch to npm for create-react-app

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?

Upvotes: 47

Views: 13074

Answers (2)

Aliaksandr Sushkevich
Aliaksandr Sushkevich

Reputation: 12364

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

Upvotes: 35

Tholle
Tholle

Reputation: 112777

You can use the --use-npm flag:

create-react-app my-project --use-npm

Upvotes: 99

Related Questions