简体   繁体   English

使用 npm 或 npx 创建反应应用程序时出错

[英]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:我正在使用这些命令创建一个项目:

  1. I added create-react-app globally using this npm install -g create-react-app我使用这个npm install -g create-react-app
  2. I created a project using the following command create-react-app demo我使用以下命令create-react-app demo创建了一个项目

在此处输入图像描述

  1. I checked for npm audit and got the following answer我检查了npm 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

I have node v12.13.0 and npm 6.12.0.我有节点 v12.13.0 和 npm 6.12.0。 Try npx create-react-app demo console尝试npx create-react-app demo控制台

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NPX-CRA:创建反应应用程序,使用 npx 会引发错误 - NPX-CRA: creating react app, using npx throws an error 运行 npm 启动和使用 npx create-react-app 创建 React 应用程序时出错 - Error running npm start and creating React application using npx create-react-app 使用 npx create-react-app 创建应用后<myproject> ,并使用“npm start”启动应用程序我得到了下面提到的这个错误</myproject> - After creating app using npx create-react-app <myproject> , and start app by using "npm start" i got this error mentioned below 在创建反应项目时在“npx create-react-app my-app”之后运行命令“npm start”时出错 - getting error when run command 'npm start' after 'npx create-react-app my-app' in creating a react project 创建反应应用程序时出现 npm 启动错误 - Getting npm start error while creating a react app 运行 npx create-react-app 时遇到错误 - Facing error while running npx create-react-app 错误“您的缓存文件夹包含根拥有的文件,由于以前版本的 npm 中的错误”而“npx create-react-app example_app” - Error "Your cache folder contains root-owned files, due to a bug in previous versions of npm" while "npx create-react-app example_app" npm init @eslint/config 错误 & npx create-react-app。 错误 - npm init @eslint/config error & npx create-react-app . error 使用 npx create-react-app 时收到此错误消息 - Getting this error messages when using npx create-react-app 使用 npx 在 Windows 中创建新的 React 应用程序时出错 - Error when create a new React App in Windows using npx
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM