node.js - 如何修复 Windows 10 中的 "npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142"错误?

标签 node.js angular npm

我正在使用 Windows 10。我想在我的系统上使用 Angular 4。当我运行 node -v 和 npm -v 时,它会显示版本。但是当我执行语句 npm install -g @angular/cli 时,我给出:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142C:\Users\VAISHU\AppData\Roaming\npm\ng -> C:\Users\VAISHU\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng

> @angular/cli@9.1.9 postinstall C:\Users\VAISHU\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/postinstall/script.js

+ @angular/cli@9.1.9
updated 1 package in 15.317s
当我输入命令 ng -v 时,它显示:
Available Commands:
  add Adds support for an external library to your project.
  analytics Configures the gathering of Angular CLI usage metrics. See https://angular.io/cli/usage-analytics-gathering.
  build (b) Compiles an Angular app into an output directory named dist/ at the given output path. Must be executed from within a workspace directory.
  deploy Invokes the deploy builder for a specified project or for the default project in the workspace.
  config Retrieves or sets Angular configuration values in the angular.json file for the workspace.
  doc (d) Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword.
  e2e (e) Builds and serves an Angular app, then runs end-to-end tests using Protractor.
  generate (g) Generates and/or modifies files based on a schematic.
  help Lists available commands and their short descriptions.
  lint (l) Runs linting tools on Angular app code in a given project folder.
  new (n) Creates a new workspace and an initial Angular app.
  run Runs an Architect target with an optional custom builder configuration defined in your project.
  serve (s) Builds and serves your app, rebuilding on file changes.
  test (t) Runs unit tests in a project.
  update Updates your application and its dependencies. See https://update.angular.io/
  version (v) Outputs Angular CLI version.
  xi18n (i18n-extract) Extracts i18n messages from source code.

For more detailed help run "ng [command name] --help"
不知道要不要卸载Node js,重新安装。请提出任何解决方案。谢谢你。

最佳答案

我在 Ubuntu 20.04 上安装 node unirest 模块时收到了相同的消息,但是当我第二次运行该命令时,不再显示警告。
第一次警告:

user@server:~/project$ npm install -S unirest
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 55 packages, and audited 57 packages in 2s

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

found 0 vulnerabilities
第二次没有警告:
user@server:~/project$ npm install -S unirest

up to date, audited 59 packages in 617ms

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

found 0 vulnerabilities

关于node.js - 如何修复 Windows 10 中的 "npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62528331/

相关文章:

javascript - 在 Node 中使用 Babel 导入 vs 要求

javascript - 在加载所有任务之前不会设置 Grunt 环境变量

javascript - 为什么 Jasmine 测试中不会抛出错误?

javascript - 如何使用 npm 在 Windows 8(64 位)上安装 v8-profiler?

node.js - 为什么 NVM 安装认为我使用了错误版本的 Node?

twitter-bootstrap - 使用 NPM 安装 Bootstrap 4 alpha

node.js - 使用快速验证器 typescript 定义

javascript - 当我流式上传文件时,尽管传递了磁盘存储位置参数,但内存缓冲区已满

javascript - 具有动态行的 Angular 2 Material 数据表

angular - 如何在登录页面中以 Angular 2 实现 "remember me"