【问题标题】:react app creation going to stop after showing "found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details"在显示“发现 1 个低严重性漏洞运行 `npm audit fix` 以修复它们,或 `npm audit` 了解详细信息”后,react 应用程序创建将停止
【发布时间】:2020-05-28 12:41:40
【问题描述】:

在 Visual Studio Code 中运行以下命令以创建 React 应用时:

create-react-app my-first-react-app

它会停止进度并显示以下消息:

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

到那时它只创建节点模块package.jsonpackage-lock.json,它不会创建app.jspublicsrc 目录和文件。

所以请帮我创建一个反应应用程序。

下面显示了我创建 React 应用程序的步骤和生成的日志:

PS D:\C_programs\NodeJsApp\my-first-react-app> npm install -g create-react-app     
C:\Users\Mahendra\AppData\Roaming\npm\create-react-app -> C:\Users\Mahendra\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
updated 1 package in 60.481s
PS D:\C_programs\NodeJsApp\my-first-react-app> create-react-app my-first-react-app 

Creating a new React app in D:\C_programs\NodeJsApp\my-first-react-app\my-first-react-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


> core-js@2.6.11 postinstall D:\C_programs\NodeJsApp\my-first-react-app\my-first-react-app\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall D:\C_programs\NodeJsApp\my-first-react-app\my-first-react-app\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.5 postinstall D:\C_programs\NodeJsApp\my-first-react-app\my-first-react-app\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ react-scripts@3.4.1
+ react-dom@16.13.1
+ react@16.13.1
+ cra-template@1.0.3
added 1626 packages from 751 contributors and audited 1630 packages in 1114.609s

59 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details


Sreenshot showing the same error log

【问题讨论】:

  • 它不会停止进度 - 审计 警告 是安装中打印的最后一件事,之后它就完成了。
  • 根据日志,您没有错误。你的反应应用程序应该在文件夹 D:\C_programs\NodeJsApp\my-first-react-app\my-first-react-app 和更多细节 - 你的源代码在子目录“my-first-react-app\我的第一个反应应用程序”。我的意思是你在另一个“my-first-react-app”中有两个同名文件夹——代码应该在最后一个
  • 审计警告不是最后一个警告,因为在创建的应用程序目录中,一些目录如 src、public、app.js 不存在。
    如果完成,我不需要按 ctrl +C 运行其他命令
  • @Mahendra 你给了足够的时间来完成它吗?尝试运行它并在几分钟后返回。

标签: javascript node.js reactjs npm


【解决方案1】:

我遇到了同样的问题。 我的问题是我的反恶意软件阻止了某些软件包的下载。 尝试停用此软件并再次将create-react-app my-first-react-app 写入您的控制台。

【讨论】:

  • 谢谢你的建议,我按照你的建议做了,但还是同样的问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-11-22
  • 1970-01-01
  • 2020-07-05
  • 2020-02-15
  • 1970-01-01
  • 2018-10-24
  • 2021-09-09
相关资源
最近更新 更多