puppetlabs/puppet · error · Puppet::ParseError

Unknown type < >

Error message

Unknown type <%{type}>

What it means

Generic guard raised when a type name inside a type expression cannot be resolved to any known type by the parser or loaders.

Solutions

  1. Check the type name for spelling and correct capitalization
  2. Define the custom type before referencing it, or load it from the right module
  3. Qualify the type name with its module namespace, e.g. Mymodule::Mytype
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/puppet/pops/types/type_parser.rb:682 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/ef500b392f727b57. Report an issue: GitHub.

Appendix: source

Thrown at lib/puppet/pops/types/type_parser.rb:682

    raise_invalid_type_specification_error(ast) unless TypeFactory.is_range_parameter?(t)
  end

  def raise_invalid_type_specification_error(ast)
    raise Puppet::ParseError, _("The expression <%{expression}> is not a valid type specification.") %
                              { expression: original_text_of(ast) }
  end

  def raise_invalid_parameters_error(type, required, given)
    raise Puppet::ParseError, _("Invalid number of type parameters specified: %{type} requires %{required}, %{given} provided") %
                              { type: type, required: required, given: given }
  end

  def raise_unparameterized_type_error(ast)
    raise Puppet::ParseError, _("Not a parameterized type <%{type}>") % { type: original_text_of(ast) }
  end

  def raise_unknown_type_error(ast)
    raise Puppet::ParseError, _("Unknown type <%{type}>") % { type: original_text_of(ast) }
  end

  def original_text_of(ast)
    ast.locator.extract_tree_text(ast)
  end
end
end
end

View on GitHub (pinned to e227c27540)