【问题标题】:npm WARN deprecated tar@2.2.2npm WARN 已弃用 tar@2.2.2
【发布时间】:2022-06-15 12:51:39
【问题描述】:

即使我已将 tar 更新到 8.3.1 版,它也不允许我安装 react(npm install -g create-react-app)。在我尝试安装 react 后,它会输出以下消息:

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

changed 67 packages, and audited 68 packages in 2s

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

2 high severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details."

当我输入 npm audit 时,它会输出发现 0 个漏洞。

【问题讨论】:

    标签: node.js reactjs npm installation


    【解决方案1】:

    这不是错误。 create-react-app 正是使用这个版本(2.2.2)的 tar,即使它已经过时了。您可以通过运行此命令npm install tar@latest -g 全局安装新版本的 tar,但由于 create-react-app 使用其他版本,您可能仍会看到该警告。

    【讨论】:

      【解决方案2】:

      这个问题有2个完整的解决方案,但需要通过观看视频来了解,所以点击这个视频并按照视频中描述的步骤进行操作:

      YouTube Video to Watch 2 Solution of this Problem

      【讨论】:

        猜你喜欢
        • 2017-12-16
        • 2016-11-17
        • 1970-01-01
        • 2023-02-08
        • 2022-12-23
        • 1970-01-01
        • 2020-12-14
        • 2016-09-08
        • 2023-01-12
        相关资源
        最近更新 更多