npm
How to replace an npm package
In the root directory of your project, open the
package.jsonfile.If the vulnerability is in a direct dependency just replace the existing version constraint in the
dependenciessection:{ "dependencies": { "package": "1.7.9-sp1" } }If the vulnerability is in a transitive dependency just add to the
overridessection (if one doesn't exist yet, you'll have to add it to the file) the following:{ "overrides": { "package@1.7.9": "1.7.9-sp1" } }In the root directory, run
npm install.
Last updated