gpt4 book ai didi

javascript - 如何使用 loadVirtual 和 ENOLOCK 修复 npm 审计错误?

转载 作者:行者123 更新时间:2023-12-03 15:53:50 38 4
gpt4 key购买 nike

➜   npm audit
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
我运行 npm audit 并收到此错误。
当我在下面运行时:
➜ npm config get package-lock
true

➜ npm config get shrinkwrap
true
有人可以帮忙吗?至于如何解决?并且 npm audit fix --force 也无法正常工作...

最佳答案

我刚刚运行了它说的命令。

npm i --package-lock-only
然后它向我展示了 0 个漏洞。
无论如何,再次运行审核修复并再次运行 0 个漏洞。

关于javascript - 如何使用 loadVirtual 和 ENOLOCK 修复 npm 审计错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65573579/

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