Consider a scenario where the dependencies section in the package.json
file looks like this:
"dependencies": {
"A": "1.0.0"
}
Now, let's say that the current version of package A is 3.0.0
, but for our project we specifically need version 1.0.0
of package A
. This required version is explicitly mentioned in the package.json
file.
Next, let's introduce another package B
that has a dependency on package A
. While the latest version of B
is 3.0.0
, it is not compatible with "A": "1.0.0"
. The correct version of package B
that is compatible with "A": "1.0.0"
would be "B": "1.0.0"
.
The question arises -
How can one determine which version of package
B
is compatible with"A":"1.0.0"
?Is there a way to automatically install versions of packages that are dependent on package
A
and compatible with"A": "1.0.0"
?