➜ 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也不能解决...
package-lock.json
。 - jithilnpm init
初始化了吗?之后,只需键入npm i --package-lock-only
。不应该看到任何错误或漏洞。 - Nicolas Garcia III