{"record":{"id":"347e2e42e43c5b53","repo":"pentaho/pentaho-kettle","slug":"a-module-with-id-idoralias-is-not-defined","errorCode":null,"errorMessage":"A module with id '{idOrAlias}' is not defined.","messagePattern":"A module with id '(.+?)' is not defined\\.","errorType":"validation","errorClass":"ArgumentInvalidError","httpStatus":null,"severity":"error","filePath":"plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js","lineNumber":138,"sourceCode":"            if(alias !== null && alias !== id) {\n              if(this.__get(alias) !== null || O.hasOwn(preparedModuleSpecMap, alias)) {\n                throw new ArgumentInvalidError(\n                  \"moduleSpecMap\",\n                  \"Module with id '\" + id + \"' specifies an alias which is already taken: '\" + alias + \"'.\");\n              }\n\n              preparedModuleSpecMap[alias] = moduleSpec;\n            }\n          }\n        }\n\n        function moduleResolver(idOrAlias, expectedKind) {\n\n          var module = me.__get(idOrAlias);\n          if(module === null) {\n            var preparedModuleSpec = O.getOwn(preparedModuleSpecMap, idOrAlias, null);\n            if(preparedModuleSpec === null) {\n              throw new ArgumentInvalidError(\n                \"moduleSpecMap\",\n                \"A module with id '\" + idOrAlias + \"' is not defined.\");\n            }\n\n            module = createModule(preparedModuleSpec);\n          }\n\n          if(expectedKind && module.kind !== expectedKind) {\n            throw new ArgumentInvalidError(\n              \"moduleSpecMap\",\n              \"Expected module '\" + module.id + \"' to be \" + (expectedKind === \"type\" ? \"a \" : \"an \") + expectedKind);\n          }\n\n          return module;\n        }\n\n        function createModule(preparedModuleSpec) {\n","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js#L120-L156","documentation":"pentaho.lang.ArgumentInvalidError thrown by moduleResolver when resolving a dependency by id or alias that is neither an already-registered module nor present in the batch's preparedModuleSpecMap. The resolver cannot construct the requested module because nothing defines it.","triggerScenarios":"A module spec references a dependency (e.g. in `type`, `aspects`, or ancestors) whose id/alias was never defined or mis-typed, during MetaService-driven creation of a module.","commonSituations":"Typo in a dependency id; dependency provided by a plugin that is not loaded/installed; dependency defined in a later configuration batch that has not run yet.","solutions":["Correct the dependency id/alias spelling in the module spec.","Ensure the module providing the dependency is defined/loaded before this module.","Check plugin/module registration order and that required modules are on the requirejs paths."],"exampleFix":"// before\n{\"my/view\": {\"type\": \"pentaho/viz/impl/barrChart\"}} // typo\n// after\n{\"my/view\": {\"type\": \"pentaho/visual/impl/barChart\"}}","handlingStrategy":"validation","validationCode":"deps.forEach(function(d) {\n  if(metaService.get(d.id || d) === null) throw new Error(\"undefined dependency: \" + (d.id || d));\n});","typeGuard":"null","tryCatchPattern":"try { metaService.__configure(map); } catch(e) { if(/is not defined/.test(e.message)) { console.error(\"check dependency ids and plugin load order\", e.message); } else { throw e; } }","preventionTips":["Define dependencies before dependent modules","Require the modules that register dependencies before configuration","Spell-check ids against the module registry"],"tags":["module-not-found","dependency-resolution","invalid-argument"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}