Answers for "yarn for npm audit fix --force"

5

yarn audit fix

Yarn doesn't have npm audit fix.

But here's how to do it by using npm – temporarily.

Generate a package-lock.json file without installing node modules
npm i --package-lock-only

Fix the packages and update the package-lock.json file
npm audit fix

Delete the yarn.lock file and convert package-lock.json file into yarn.lock
rm yarn.lock
yarn import

Delete the package-lock.json file
rm package-lock.json
Posted by: Guest on March-06-2021

Browse Popular Code Answers by Language