简体   繁体   中英

Getting error while installing live-server package using npm. `npm audit` is not helping to fix the problem

I am new to javascript. I am trying to learn javascript by following instructions here . I am trying to install live-server package using npm but I am seeing the following error.

$ 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'
}
  1. You shouldn't bother too much about it. It's more an warning than error. And there is not much you can do. To check if the package is installed, go in package.json file, it should be in dependencies object.
  2. Nowadays if you use vscode you don't need to install live-server as it is already built in.

You can read more about npm audit here npm audit: Broken by Design

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM