puppetlabs/puppet · error · ArgumentError

Creation of new instance of type '#{type}' is not supported

Error message

Creation of new instance of type '#{type}' is not supported

What it means

Error "Creation of new instance of type '#{type}' is not supported" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/pops/types/types.rb:345

  #
  # @return [Function] the created function
  # @raises ArgumentError
  #
  def new_function
    self.class.new_function(self)
  end

  # This default implementation of of a new_function raises an Argument Error.
  # Types for which creating a new instance is supported, should create and return
  # a Puppet Function class by using Puppet:Loaders.create_loaded_function(:new, loader)
  # and return that result.
  #
  # @param type [PAnyType] the type to create a new function for
  # @return [Function] the created function
  # @raises ArgumentError
  #
  def self.new_function(type)
    raise ArgumentError, "Creation of new instance of type '#{type}' is not supported"
  end

  # Answers the question if instances of this type can represent themselves as a string that
  # can then be passed to the create method
  #
  # @return [Boolean] whether or not the instance has a canonical string representation
  def roundtrip_with_string?
    false
  end

  # The default instance of this type. Each type in the type system has this constant
  # declared.
  #
  DEFAULT = PAnyType.new

  protected

  # @api private

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/pops/types/types.rb:345 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/38ec50ac54d8a90d. Report an issue: GitHub.