[英]Error while creating react app using npm or npx
I am getting an error when I create react app following screenshot is an error:当我创建反应应用程序时出现错误,以下屏幕截图是一个错误:
Node.js version v12.18.1 Node.js版本v12.18.1
npm version v6.14.5 npm版v6.14.5
I am creating a project using these commands:我正在使用这些命令创建一个项目:
npm install -g create-react-app
npm install -g create-react-app
create-react-app demo
create-react-app demo
创建了一个项目npm audit
and got the following answernpm audit
并得到以下答案 I also used this following method to create a project我还使用以下方法创建了一个项目
npx create-react-app demo
but I also got an error in this too.但我也有一个错误。 but this error is too long to add to this question.
但是这个错误太长了,无法添加到这个问题中。 Please, give me some solution for this problem.
请给我一些解决这个问题的方法。 until then I can't work forward.
在那之前我无法继续工作。
In create-react-app documentation says:在 create-react-app 文档中说:
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 to ensure that npx always uses the latest version.
如果您之前通过 npm install -g create-react-app 全局安装了 create-react-app,我们建议您使用 npmpxg 卸载 package。
https://create-react-app.dev/docs/getting-started#quick-start https://create-react-app.dev/docs/getting-started#quick-start
And just use: npx create-react-app demo
只需使用:
npx create-react-app demo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.