puppetlabs/puppet · error · Puppet::ModuleTool::Errors::NoVersionsSatisfyError

Could not %{action} '%{module_name}' (%{version}); no versio

Error message

Could not %{action} '%{module_name}' (%{version}); no version satisfies all dependencies

What it means

Raised by the Upgrader as Puppet::ModuleTool::Errors::NoVersionsSatisfyError when SemanticPuppet::Dependency.resolve throws UnsatisfiableGraph: no assignment of versions can satisfy every constraint in the dependency graph at once. The graph includes constraints from all installed modules' dependencies plus pinned versions (add_module_name_constraints_to_graph pins each installed module to its current version unless --force), so a single incompatible dependent module blocks the upgrade.

Source

Thrown at lib/puppet/module_tool/applications/upgrader.rb:148

            graph.add_constraint('installed', installed_module, installed_range) do |node|
              Puppet::Module.parse_range(installed_range).include? node.version
            end

            release.mod.dependencies.each do |dep|
              dep_name = dep['name'].tr('/', '-')

              range = dep['version_requirement']
              graph.add_constraint("#{installed_module} constraint", dep_name, range) do |node|
                Puppet::Module.parse_range(range).include? node.version
              end
            end
          end

          begin
            Puppet.info _("Resolving dependencies ...")
            releases = SemanticPuppet::Dependency.resolve(graph)
          rescue SemanticPuppet::Dependency::UnsatisfiableGraph
            raise NoVersionsSatisfyError, results.merge(:requested_name => name)
          end

          releases.each do |rel|
            mod = installed_modules_source.by_name[rel.name.split('-').last]
            next unless mod
            next if mod.has_metadata? && mod.forge_name.tr('/', '-') == rel.name

            if rel.name != name
              dependency = {
                :name => rel.name,
                :version => rel.version
              }
            end

            raise InstallConflictError,
                  :requested_module => name,
                  :requested_version => options[:version] || 'latest',
                  :dependency => dependency,

View on GitHub (pinned to e227c27540)

Solutions

  1. Retry with `puppet module upgrade <name> --force` to relax the installed-version pinning constraints
  2. Upgrade the conflicting dependents together in one pass so their constraints move in sync
  3. Use `puppet module list --tree` to find which installed module pins the conflicting dependency, and upgrade or uninstall it
  4. If a stale module no longer needs to be installed, uninstall it to remove its constraint from the graph

Example fix

# before
$ puppet module upgrade puppetlabs-apache
# Error: 'puppetlabs-apache' (latest) requested; no version satisfies all dependencies

# after
$ puppet module upgrade puppetlabs-apache --force
Defensive patterns

Strategy: try-catch

Try / catch

begin
  result = Puppet::ModuleTool::Applications::Upgrader.new(name, options).run
rescue Puppet::ModuleTool::Errors::NoVersionsSatisfyError => e
  # escalate to force (drops installed-version pinning) or report the conflicting graph
  Puppet::ModuleTool::Applications::Upgrader.new(name, options.merge(force: true)).run
end

Prevention

When it happens

Trigger: Running `puppet module upgrade A` where A's newer releases require B >= 3.0, but an installed module C declares B < 3.0 in its metadata.json, and C is pinned to its installed version because --force was not given.

Common situations: Classic dependency hell between Forge modules (stdlib/translate/concat pins); an old module left in the environment pinning a shared dependency; upgrading one member of a tightly coupled set (e.g. puppetlabs-* profile modules) in isolation.

Related errors


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/9b529f6fe4fe080b. Report an issue: GitHub.