Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade a React project built with create-react-app to the next create-react-app version?

I have a React project built with create-react-app 1.5. I would like to get the features of create-react-app 2.0 for my React project.

Specifically I would like to use this: https://github.com/facebook/create-react-app/pull/3909

like image 521
atkayla Avatar asked Feb 11 '18 03:02

atkayla


People also ask

How do I update my react project to the newest version?

To update your React version, install the latest versions of the react and react-dom packages by running npm install react@latest react-dom@latest . If you use create-react-app , also update the version of react-scripts . Copied! The command will update the versions of the react-related packages.

What is the latest version of create react app?

v5. 0.0 (2021-12-14)


1 Answers

Basically, to upgrade a create-react-app project, all you need to do is update the react-scripts module to the latest version and update your app to be compatible with any breaking changes in react-scripts.

Run yarn upgrade --latest react-scripts, rebuild your app, and everything should more-or-less work, barring any breaking changes.

like image 129
wgoodall01 Avatar answered Sep 19 '22 17:09

wgoodall01