javascript 使用npm安装live-server软件包时出错,“npm audit”无助于解决问题

xcitsw88  于 2022-12-25  发布在  Java
关注(0)|答案(1)|浏览(210)

我是javascript的新手。我正在尝试按照here的说明学习javascript。我正在尝试使用npm安装live-server包,但是我看到了下面的错误。

$ npm install -g live-server
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

changed 208 packages, and audited 209 packages in 7s

2 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
sshil-414HTD6:IssueTracker sshil$  npm audit fix --force
npm WARN using --force Recommended protections disabled.

up to date, audited 1 package in 192ms

found 0 vulnerabilities

$ npm i live-server
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated opn@6.0.0: The package has been renamed to `open`
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

added 208 packages, and audited 209 packages in 6s

3 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
$ npm version
{
  issuetracker: '1.0.0',
  npm: '8.19.2',
  node: '19.0.0',
  v8: '10.7.193.13-node.16',
  uv: '1.43.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '111',
  nghttp2: '1.47.0',
  napi: '8',
  llhttp: '8.1.0',
  openssl: '3.0.5+quic',
  cldr: '41.0',
  icu: '71.1',
  tz: '2022b',
  unicode: '14.0',
  ngtcp2: '0.8.1',
  nghttp3: '0.7.0'
}
dgjrabp2

dgjrabp21#

1.你不应该为此烦恼太多。它更多的是一个警告而不是错误。而且你也没有什么可以做的。要检查软件包是否安装,进入package.json文件,它应该在依赖对象中。
1.现在如果你使用vscode,你不需要安装live-server,因为它已经内置了。
您可以在这里阅读更多关于npm审计的信息npm audit: Broken by Design

相关问题