puppetlabs/puppet · error · ArgumentError

Illegal type name '#{type_name}'

Error message

Illegal type name '#{type_name}'

What it means

Error "Illegal type name '#{type_name}'" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/pops/types/type_factory.rb:439

  end

  # Produces an instance of the SemVer type
  def self.sem_ver(*ranges)
    ranges.empty? ? PSemVerType::DEFAULT : PSemVerType.new(ranges)
  end

  # Produces a PResourceType with a String type_name A PResourceType with a nil
  # or empty name is compatible with any other PResourceType.  A PResourceType
  # with a given name is only compatible with a PResourceType with the same
  # name.  (There is no resource-type subtyping in Puppet (yet)).
  #
  def self.resource(type_name = nil, title = nil)
    case type_name
    when PResourceType
      PResourceType.new(type_name.type_name, title)
    when String
      type_name = TypeFormatter.singleton.capitalize_segments(type_name)
      raise ArgumentError, "Illegal type name '#{type_name}'" unless type_name =~ Patterns::CLASSREF_EXT

      PResourceType.new(type_name, title)
    when nil
      raise ArgumentError, 'The type name cannot be nil, if title is given' unless title.nil?

      PResourceType::DEFAULT
    else
      raise ArgumentError, "The type name cannot be a #{type_name.class.name}"
    end
  end

  # Produces PClassType with a string class_name.  A PClassType with
  # nil or empty name is compatible with any other PClassType.  A
  # PClassType with a given name is only compatible with a PClassType
  # with the same name.
  #
  def self.host_class(class_name = nil)
    if class_name.nil?

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/pops/types/type_factory.rb:439 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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