为什么 npm install -g firebase-tools 请求已被弃用

问题描述

我正在尝试使用 Github 操作将 React 应用程序部署到 firebase。 在 git bash 终端上我输入:

$ npm install -g firebase-tools

它回答:

npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142


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.

我不明白我该怎么办?有人可以帮我吗?

解决方法

为了解决这个问题我试过

devise_for :users,controllers: {
sessions: 'users/sessions',registrations: 'users/registrations',passwords: 'users/passwords'

}

但它不起作用,因为该库不再受支持。此外,firebase 工具对于 npm update -g firebase-tools 命令 to generate an authentication token for use in non-interactive environments. 是必需的。但是您知道如果没有 Firebase 工具,这将毫无意义。

firebase login:ci

此命令行可帮助您下载和安装 CLI,而无需任何依赖项。成功了。

作为下一步,我输入:

curl -sL firebase.tools | bash

但是有一个错误

firebase login:ci 

激活它:

Error: Cannot run login:ci in non-interactive mode.

所有这些命令行都经过测试和批准,IT WORKS