创建反应应用程序时不断出现错误

Hem*_*Hem 10 reactjs create-react-app

我一直在尝试创建一个反应应用程序,所以基本上是一个新项目,例如 hello world 或任何东西。

我尝试使用npx create-react-app my-app

我得到的错误是:

You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1).

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/
Run Code Online (Sandbox Code Playgroud)

我尝试按照这些步骤操作,甚至使用卸载,npm uninstall -g create-react-app但我仍然不断收到相同的错误。

我的 npm 版本:6.14.8

这是在 React 中创建第一个应用程序的基本过程,我不知道为什么它如此复杂。有人可以告诉我如何修复该错误以及如何顺利创建反应应用程序吗?

如果需要更多信息,请随时在下面评论:)

May*_*ava 8

npm install -g create-react-app
Run Code Online (Sandbox Code Playgroud)

上面为我修好了。


Kas*_*Ali 7

为我工作:

npm uninstall -g create-react-app
npm install -g create-react-app
npx create-react-app app-name
Run Code Online (Sandbox Code Playgroud)