解决audit显示的依赖版本问题

解决audit显示的依赖版本问题:

首先上解决方法:
这是依赖版本问题,但是很多更新了包依然报错,这是因为虽然更新了包,但是还是用的之前的包。尝试删除package-lock.json和node_modules,然后npm i

That’s because maybe you have old versions of some libs or some libs have other libs with old versions as dependencies. I must say that you don’t need to worry about this. Worry about this when you are building your own app/product. If you are just following an example or tutorial don’t bother about this!

– luissmg
Feb 27 '19 at 14:58
Ok let’s assume that this is a production level banking app… what I am looking for is what I can do to resolve these. I have spend one full day on this but have not been able to figure it out.

– KalC
Feb 27 '19 at 16:04

In that case you should audit and check what are the libs that have these dependencies. If you have everything updated you should not get these warning

– luissmg
Feb 27 '19 at 16:18
I have run “npm update” (inside the project folder) a few times. Still getting these warnings upon “npm audit”. I will ignore these for now as these nuances impede learning.

– KalC
Feb 27 '19 at 16:23

ike I told you before, even the package being updated, it does not mean that the package uses the latest version for a specific lib… Try to remove package-lock.json, remove node_modules and then run npm i again

– luissmg
Mar 1 '19 at 9:53

npm list -g /-S/-D --depth 0 查看已安装的包
tip:这个命令还可以查看已安装的包缺少哪些依赖
npm update 更新全部依赖

你可能感兴趣的:(vue,vue,vue.js)