How do I fix a vulnerable npm package in my package-lock.json that isn't listed in the package.json?

后端 未结 9 1960
面向向阳花
面向向阳花 2020-12-07 19:44

Github is telling me that a dependency in my package-lock.json file is vulnerable and outdated. The problem is that if I do npm install or npm update

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 20:26

    To check vulnerable npm packages, just use following commands:

    npm audit
    

    To fix vulnerable npm packages, just use following commands which will fix package-lock.json too:

    npm audit fix
    

提交回复
热议问题