{"record":{"id":"79346dd790f05985","repo":"puppetlabs/puppet","slug":"environment-env-cannot-find-module-module","errorCode":null,"errorMessage":"Environment '%{env}', cannot find module '%{module_name}'","messagePattern":"Environment '%(.+?)', cannot find module '%(.+?)'","errorType":"exception","errorClass":"Puppet::DataBinding::LookupError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/lookup/module_data_provider.rb","lineNumber":86,"sourceCode":"      if Puppet[:strict] == :error\n        config.fail(Issues::HIERA_VERSION_3_NOT_GLOBAL, :where => 'module')\n      else\n        Puppet.warn_once(:hiera_v3_at_module_root, config.config_path, _('hiera.yaml version 3 found at module root was ignored'), config.config_path)\n      end\n      nil\n    end\n  end\n\n  # Return the root of the module with the name equal to the configured module name\n  #\n  # @param lookup_invocation [Invocation] The current lookup invocation\n  # @return [Pathname] Path to root of the module\n  # @raise [Puppet::DataBinding::LookupError] if the module can not be found\n  #\n  def provider_root(lookup_invocation)\n    env = lookup_invocation.scope.environment\n    mod = env.module(module_name)\n    raise Puppet::DataBinding::LookupError, _(\"Environment '%{env}', cannot find module '%{module_name}'\") % { env: env.name, module_name: module_name } unless mod\n\n    Pathname.new(mod.path)\n  end\nend\nend\nend\n","sourceCodeStart":68,"sourceCodeEnd":93,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/lookup/module_data_provider.rb#L68-L93","documentation":"Error \"Environment '%{env}', cannot find module '%{module_name}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/lookup/module_data_provider.rb:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}