使用 npx create-react-app app-name
创建项目报错
Need to install the following packages:
create-react-app
Ok to proceed? (y)
You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).
We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/
使用npm uninstall -g create-react-app
之后再次创建仍然是相同的错误
使用npx create-react-app@latest your-project-name
解决