为什么 "npm audit" CLI 在 Windows 10 中不从 Powershell 命令 运行?

Why doesn't "npm audit" CLI command run from Powershell in Windows 10?

当我在 Powershell 中 运行 执行 npm audit 任务时,我得到提示询问 "Did you mean this? Edit"

我 运行 正在我的项目的根目录中(带有 package.json 文件)并且其他 npm 命令按预期工作。

似乎无法识别该命令。根据我在文档中看到的内容:https://docs.npmjs.com/cli/audit 这应该开箱即用,无需任何其他软件包。

在 npm v6 中添加了 npm audit 命令。 [1]

Node.js v10.3.0 是第一个捆绑 npm v6 的 Node 版本。升级到 Node v10.3.0 或更高版本将为您提供 npm v6 和 npm audit 支持。

您还可以通过 运行 npm install -g npm 独立于您的 Node.js 版本升级您的 npm 版本。 [2]