Npm安装会发出警告,npm审核修复不起作用 [英] Npm install gives warnings, npm audit fix not working
问题描述
我正在使用.net核心网络api开发一个有角度的应用程序.
I am working on an angular app with a .net core web api.
当我克隆此存储库时,我尝试在angular应用程序上运行npm install,但出现一个奇怪的错误:
When I cloned this repository, I tried to run npm install on the angular application, but I got a strange error:
npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 34090 packages in 14.711s
found 15 vulnerabilities (9 low, 6 high)
run `npm audit fix` to fix them, or `npm audit` for details
此外,如果我尝试进行npm审核修复,则会收到更多错误:
Also, if I try to do npm audit fix, I get even more errors:
npm audit fix
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run npm install to fix them.
npm ERR! Invalid: lock file's @progress/kendo-theme-default@file:https:/registry.npmjs.org/@progress/kendo-theme-default/-/kendo-theme-default-2.48.1.tgz does not satisfy @progress/kendo-theme-default@file:lib/kendo-theme-default
npm ERR! Invalid: lock file's bootstrap@file:https:/registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz does not satisfy bootstrap@file:lib/bootstrap
我该如何解决?
推荐答案
通常,这与package-lock.json混乱有关.我建议尝试:
Often times, this is related to package-lock.json messing. I would suggest to try to:
1-删除您的package-lock.json
1 - Delete your package-lock.json
2-删除您的node_modules文件夹
2 - Delete your node_modules folder
3-再次尝试npm安装
3 - Try npm install again
这曾经解决了在我的角度应用程序中添加新软件包时的几个问题.
This used to fix several issues when adding new packages in my angular apps.
祝你好运!
这篇关于Npm安装会发出警告,npm审核修复不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!