Sometimes it really hurts to work with dependencies which are loaded by other dependencies. One of this time-consuming tasks can be to fix npm audits.

Before you break the internet and start to run in your personal nightmare of dependencies. https://www.npmjs.com/package/npm-force-resolutions is your solution. Please read the description of the npm package, before using.

npm i npm-force-resolutions

Add the version in your package.json, like for example:

"resolutions": {
    "braces": ">=2.3.2",
    "tar": ">=4.4.8"
}

Now remove the node_modules directory, start to force the defined version(s) and install.

rm -r node_modules npx npm-force-resolutions npm install

Sometimes its stucks, so execute the command step by step.

rm -r node_modules
npx npm-force-resolutions
npm install

To confirm the right version:

npm ls {braces,tar}

Start your project and take a coffee. Now you can relax again.