{"record":{"id":"80c12ae6e9127f4d","repo":"pentaho/pentaho-kettle","slug":"a-module-with-id-or-alias-idoralias-is-not-defined","errorCode":null,"errorMessage":"A module with id or alias '{idOrAlias}' is not defined.","messagePattern":"A module with id or alias '(.+?)' 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":204,"sourceCode":"\n        if(module.alias !== null) {\n          this.__moduleMap[module.alias] = module;\n        }\n      },\n\n      get: function(idOrAlias, keyArgs) {\n\n        var module = this.__get(idOrAlias);\n\n        if(module === null) {\n          if(O.getOwn(keyArgs, \"createIfUndefined\", false)) {\n            // `resolver` is not used when there is no type.\n            module = new core.InstanceModuleMeta(idOrAlias, {}, null);\n\n            this.__registerModule(module);\n\n          } else if(O.getOwn(keyArgs, \"assertDefined\", false)) {\n            throw new ArgumentInvalidError(\n              \"idOrAlias\",\n              \"A module with id or alias '\" + idOrAlias + \"' is not defined.\");\n          }\n        }\n\n        return module;\n      },\n\n      getId: function(idOrAlias) {\n        var module = this.get(idOrAlias);\n        return module && module.id;\n      },\n\n      getInstancesOf: function(typeIdOrAlias) {\n\n        var instances = __createModulesList();\n\n        var type = __getTypeModule(this, typeIdOrAlias, \"typeIdOrAlias\");","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js#L186-L222","documentation":"pentaho.lang.ArgumentInvalidError thrown by MetaService.get when the module with the given id or alias is not defined and keyArgs.assertDefined is true. It is the explicit opt-in variant of returning null: callers asking for a hard guarantee get an error instead.","triggerScenarios":"Calling metaService.get(idOrAlias, {assertDefined: true}) (or APIs that pass assertDefined, like type()) with an id/alias that has never been registered.","commonSituations":"Typos in module ids; accessing a type before its defining module loaded; plugin not installed in the environment; version change where a module id was renamed.","solutions":["Verify the module id/alias and register/define it before calling get.","Load the module that defines it via require before querying the meta service.","If absence is acceptable, omit assertDefined and handle the null return."],"exampleFix":"// before\nvar t = metaService.get(\"pentaho/visaul/models/bar\", {assertDefined: true});\n// after\nvar t = metaService.get(\"pentaho/visual/models/bar\", {assertDefined: true});","handlingStrategy":"try-catch","validationCode":"if(metaService.get(idOrAlias) === null) {\n  // module not defined; register or load before proceeding\n}","typeGuard":"null","tryCatchPattern":"try { m = metaService.get(id, {assertDefined: true}); } catch(e) { if(/is not defined/.test(e.message)) { m = null; /* fallback path */ } else { throw e; } }","preventionTips":["Use plain get (returns null) when absence is acceptable","Load defining modules via require before querying","Keep a central registry of valid module ids"],"tags":["module-not-found","lookup-failed","assert-defined"],"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"}