How to deal with deprecation warnings from npm

馋奶兔 提交于 2019-12-11 05:12:26

问题


Nearly all the time I use npm to install a package, I get a warning like:

npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Then I install the dubious packages with the advised version number.

Is there any way to make npm do this automatically? At own risk of course.


回答1:


If you're not depending directly on the deprecated packages, you're probably not accomplishing anything by installing them directly. Whichever package depends on it is the one that needs to update its dependencies, and so on until you reach the package you're developing. Essentially: if it's important (e.g. a security problem), notify the package maintainers; if not, ignore the deprecation warning.



来源:https://stackoverflow.com/questions/38889519/how-to-deal-with-deprecation-warnings-from-npm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!