首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm审计响应显示为纯文本,而不是表格格式。

npm审计响应显示为纯文本,而不是表格格式。
EN

Stack Overflow用户
提问于 2022-02-03 04:31:02
回答 2查看 357关注 0票数 2

我阅读了许多与问题/文章相关的npm audit,其中人们以表格格式提供了npm audit的响应。但是,当我运行npm audit时,我会以纯文本的形式得到响应。

我尝试安装一个库npm-audit-html并获得回答中提供的HTML格式,但这遇到了一个问题:zsh: command not found: npm-audit-html

能否有人解释并帮助解决美化npm audit的反应?目前,我的npm audit响应显示如下所示:

代码语言:javascript
复制
postcss-overflow-shorthand  <=2.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-overflow-shorthand
  postcss-page-break  <=2.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-page-break
  postcss-place  <=5.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-place
  postcss-pseudo-class-any-link  <=6.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-pseudo-class-any-link
  postcss-reduce-initial  <=4.0.3
  Depends on vulnerable versions of postcss
  node_modules/postcss-reduce-initial
  postcss-reduce-transforms  <=4.0.2
  Depends on vulnerable versions of postcss
  node_modules/postcss-reduce-transforms
  postcss-replace-overflow-wrap  <=3.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-replace-overflow-wrap
  postcss-selector-matches  *
  Depends on vulnerable versions of postcss
  node_modules/postcss-selector-matches
  postcss-selector-not  <=4.0.1
  Depends on vulnerable versions of postcss
  node_modules/postcss-selector-not
  postcss-svgo  <=5.0.0-rc.2
  Depends on vulnerable versions of postcss
  Depends on vulnerable versions of svgo
  node_modules/postcss-svgo
  postcss-unique-selectors  <=4.0.1
  Depends on vulnerable versions of postcss
  node_modules/postcss-unique-selectors
  postcss-url  3.3.0 - 10.0.0
  Depends on vulnerable versions of postcss
  node_modules/postcss-url
  stylehacks  <=4.0.3
  Depends on vulnerable versions of postcss
  node_modules/stylehacks

90 vulnerabilities (84 moderate, 6 high)
EN

回答 2

Stack Overflow用户

发布于 2022-08-05 12:08:17

在windows中,我使用npm审核">“将其内容写入json文件中,请参阅下面的命令:

代码语言:javascript
复制
npm audit --json > FOLDER_PATH\FILE_NAME.json
票数 0
EN

Stack Overflow用户

发布于 2022-11-18 15:40:37

您发布的npm audit格式是npm 7的一个重大变化。

对输出和数据结构进行了重大重构,以提请注意问题,确定以前没有得到的修补程序类别,并删除未用于任何目的的无关数据。 重大变化:任何使用npm审计输出的工具几乎都需要更新,因为这在可读性和-json输出样式上都发生了重大变化。 来源:https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major

由于输出格式没有正式解释,有一个帖子试图找到它。你可以查看这篇文章以获得更多的细节。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70965951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档