ipm icon indicating copy to clipboard operation
ipm copied to clipboard

ModuleDependencies and Version

Open canzanos opened this issue 2 years ago • 6 comments
trafficstars

I'm finding the overral reliability of ModuleDependencies, Versions to be unreliable.

I have tried using <Version>*</Version> as a way of indicating that when I install Module A which is dependent on Module B with Version *. My expectation is that when I install Module A it will

  1. check to see if Module B is installed. If it is not installed ZPM will install Module B. This part works,
  2. Check if Module B is install, if it is but the remote registry has a higher version then I feel like it should install the latest version of Module B. This part is not working
  3. If I defined in Module A a dependency on Version 2, even though I have Module B Version 2 installed but it is on Version 1 I run into issues like

Could not find satisfactory version of rclib-rcipm in any repositories. Required by: rclib-wellbase: 2.1.0; rclib-ccdprofile, rclib-arcgis, rclib-logviewer, rclib-hs: *; rclib-fhir: 1.3.2

canzanos avatar Sep 29 '23 14:09 canzanos

@canzanos in your example error message what's Module A, what's Module B, and what are you trying to install?

This looks like rclib-fhir (already installed) needs a specific version of rclib-rcipm, and rclib-wellbase (already installed) needs a different specific version of rclib-rcipm. Dependencies can be declared using semver ranges (see https://github.com/npm/node-semver#ranges for description) so maybe what you really need is for rclib-fhir to require >=1.3.2 and rclib-wellbase to require >=2.1.0?

isc-tleavitt avatar Sep 29 '23 15:09 isc-tleavitt

It would be good to improve the error message here to explicitly state that there are conflicting version requirements, rather than indicating that we can't find a version that satisfies an impossible-to-satisfy set of constraints.

isc-tleavitt avatar Mar 15 '24 15:03 isc-tleavitt