gpt4 book ai didi

node.js - npm审计在使用bash的Windows上不起作用

转载 作者:行者123 更新时间:2023-12-03 12:16:06 26 4
gpt4 key购买 nike

我正在使用 Mintty 2.8.4 作为我安装 npm 包的终端。

我安装了一个名为 moment 的 npm 包的早期版本我收到了有关漏洞的警告。我的终端给我的建议之一是运行 npm audit .在运行该命令时,我的终端无法识别它。它会抛出其他可识别命令的列表。

谁能帮我解释如何运行 audit在这个终端上?

我附上了错误和我正在使用的终端的详细图像。

printscreen of npm audit not working

最佳答案

npm audit刚刚在 npm 6 中引入,我看到你正在运行 5.6.0。

https://docs.npmjs.com/getting-started/running-a-security-audit

他们可能也在 npm 5 中提供了安全报告,但是您需要 npm 6 来运行审计。

升级 npm 即可解决问题。

关于node.js - npm审计在使用bash的Windows上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52991770/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com