npm audit fix
is intended to automatically upgrade / fix vulnerabilities in npm packages. However, I haven't found out what it exactly does to fix those vulnerabilities.
I assumed that npm audit fix
would upgrade dependencies and dependencies' dependencies to the latest versions that are allowed by the semver-definitions of the packages – effectively the same as rm package-lock.json; npm install
. However npm audit fix
still performs a lot of changes after lock file removal + reinstall.
What exactly does npm audit fix
do? Does it for example install versions of dependencies newer than those allowed by the corresponding package.json
(but still semver-compatible)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…