react /create-react-app
Set up a modern web app by running one command.
★ 103,230⑂ 26,859👁 1,863⑃ 4,435● 8,435▤ 83◈ 570
103,230
stars
+0
26,859
forks
1,863
watchers
4,435
prs
8,435
issues
83
releases
570
discussions
README
Create React App
[!CAUTION]
Deprecated
Create React App was one of the key tools for getting a React project up-and-running in 2017-2021, it is now in long-term stasis and we recommend that you migrate to one of React frameworks documented on Start a New React Project.
If you are following a tutorial to learn React, there is still value in continuing your tutorial, but we do not recommend starting production apps based on Create React App.
Create React apps with no build configuration.
- Creating an App – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
Create React App works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in GitHub Discussions.
Quick Overview
sh
npx create-react-app my-app
cd my-app
npm start
If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.
_(npx comes with npm 5.2+ and higher, see instructions for older npm versions)_
Then open http://localhost:3000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with npm run build.
Get Started Immediately
You don’t need to install or configure tools like webpack or Babel.
They are preconfigured and hidden so that you can focus on the code.
Create a project, and you’re good to go.
Creating an App
You’ll need to have Node 14.0.0 or later version on your local development machine (but it’s not required on the server). We recommend using the latest LTS version. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.
To create a new app, you may choose one of the following methods:
npx
sh
npx create-react-app my-app
_(npx is a package runner tool that comes with npm 5.2+ and higher, see instructions for older npm versions)_
npm
sh
npm init react-app my-app
_npm init is available in npm 6+_
Yarn
sh
yarn create react-app my-app
_yarn create is available in Yarn 0.25+_
It will create a directory called my-app inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
└── serviceWorker.js
└── setupTests.js
No configuration or complicated folder structures, only the files you need to build your app.
Once the installation is done, you can open your project folder:
sh
cd my-app
Inside the newly created project, you can run some built-in commands:
npm start or yarn start
Runs the app in development moTop issues
#11756v5 used to include polyfills for node.js core modules by default284 comments · 2021-12-15#1333Support Lerna and/or Yarn Workspaces202 comments · 2017-01-01#8096Since updating to 3.3.0, running out of memory136 comments · 2019-12-05#11174Help, `npm audit` says I have a vulnerability in react-scripts!130 comments · 2021-07-02#1084Add more entry points120 comments · 2016-11-22#1070Provide a watching build mode that writes to the disk in development114 comments · 2016-11-20#12035DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated111 comments · 2022-02-09#5372mini-css-extract-plugin throws "Conflicting order" errors during build106 comments · 2018-10-09
Discussions
#17289PROJECT0 comments · 2026-10-23#17282[Security/Compliance]: Formal archival request to assist enterprise migration efforts1 comments · 2026-08-29#17276Reusing Dependencies Between Builds1 comments · 2026-08-08#17270Application HSE1 comments · 2026-06-12#17263Life journeys4 comments · 2026-06-01#17174Best practices for optimizing performance in Create React App projects1 comments · 2025-12-07#17173State2 comments · 2025-12-07#17156How can I hide navbar and footer on a page while having full content in every window screen width?2 comments · 2025-10-15
Latest release
v5.0.1 v5.0.1 2022-04-125.0.1 (2022-04-12) Create React App 5.0.1 is a maintenance release that improves compatibility with React 18. We've also updated our templates to use createRoot and relaxed our check for older versions of Create React App. Migrating from 5.0.0 to 5.0.1 Inside any created project that has not been ejected, run: npm install --save --save-exact [email protected] or yarn add --exact [email protected] :bug: Bug Fix - react-scripts - 12245 fix: webpack noise printed only if error or warning (@Andrew47) - create-react-app - 11915 Warn when not using the la
相关报道 (2)
News & coverage (8)
Hacker NewsAsk HN: Is create-react-app no longer maintained?▲ 6 · 8 comments · 2023-01-18Hacker NewsAsk HN: Is redux-little-router the best router option to use with redux?▲ 2 · 1 comments · 2016-10-03HostingerHow to deploy a React app in 6 steps2026-07-06DevClassReact team formally deprecates Create React App following 'perfect storm of incompatibility'2025-02-18HackerNoonAlternatives to Create React App2023-02-09YouTubeHow to Deploy React App to GitHub Pages | Step by step.2023-02-06Amazon Web Services (AWS)Deploying a Static Website with AWS Amplify and CDK2020-09-24The GitHub BlogTop open source launches on GitHub2016-10-24