🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

npm-force-resolutions

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-force-resolutions

This packages modifies package-lock.json to force the installation of specific version of a transitive dependency (dependency of dependency), similar to yarn's [selective dependency resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutio

0.0.10
latest
Version published
Weekly downloads
171K
1.01%
Maintainers
1
Weekly downloads
 
Created

What is npm-force-resolutions?

The npm-force-resolutions package allows you to force specific versions of transitive dependencies in your npm project. This can be useful when you need to ensure that a particular version of a dependency is used, regardless of what is specified in the dependency tree.

What are npm-force-resolutions's main functionalities?

Force specific dependency versions

You can specify the exact version of a package that you want to force in your project. This is done by adding a 'resolutions' field in your package.json file. For example, to force version 1.2.3 of 'package-name', you would add the above code to your package.json.

{
  "resolutions": {
    "package-name": "version"
  }
}

Run npm-force-resolutions

After specifying the resolutions in your package.json, you need to run the npm-force-resolutions command to apply these resolutions. This command updates your package-lock.json file to reflect the forced versions.

npx npm-force-resolutions

Other packages similar to npm-force-resolutions

FAQs

Package last updated on 26 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts