{"record":{"id":"2c324fbb8dd53077","repo":"pentaho/pentaho-kettle","slug":"module-with-id-id-specifies-an-alias-which-is-already-taken","errorCode":null,"errorMessage":"Module with id '{id}' specifies an alias which is already taken: '{alias}'.","messagePattern":"Module with id '(.+?)' specifies an alias which is already taken: '(.+?)'\\.","errorType":"validation","errorClass":"ArgumentInvalidError","httpStatus":null,"severity":"error","filePath":"plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js","lineNumber":122,"sourceCode":"            if(O.hasOwn(preparedModuleSpecMap, id)) {\n              throw new ArgumentInvalidError(\n                \"moduleSpecMap\",\n                \"A module with the id or alias '\" + id + \"' is already being defined.\");\n            }\n\n            moduleSpec = Object.create(moduleSpec);\n            moduleSpec.id = id;\n            moduleSpec.index = nextModuleIndex++;\n\n            preparedModuleIdList.push(id);\n\n            // Index by id and by alias, if any.\n            preparedModuleSpecMap[id] = moduleSpec;\n\n            var alias = textUtil.nonEmptyString(moduleSpec.alias);\n            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.\");","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js#L104-L140","documentation":"pentaho.lang.ArgumentInvalidError thrown by prepareModule when a module declares an `alias` that is already in use — either by an already-registered module (this.__get(alias) hits) or by another entry in the same batch. Aliases must be unique across the module registry.","triggerScenarios":"Defining two modules whose `alias` properties are equal, or defining a module whose alias collides with an existing module's id/alias registered earlier in the MetaService.","commonSituations":"Two plugins/annotations choosing the same short alias; renaming a module but leaving the old alias on a second module; shared config fragments each defining the same alias.","solutions":["Change the alias of the new module to a unique string.","Remove the alias from one of the conflicting modules.","Search the config/plugins for the alias string to find all users of it."],"exampleFix":"// before\n{\"x\": {\"alias\": \"chart\"}, \"y\": {\"alias\": \"chart\"}}\n// after\n{\"x\": {\"alias\": \"chart\"}, \"y\": {\"alias\": \"chart2\"}}","handlingStrategy":"validation","validationCode":"var aliases = {};\nObject.keys(map).forEach(function(k) {\n  var a = map[k] && map[k].alias;\n  if(a && (aliases[a] || k === a || map[a])) throw new Error(\"alias taken: \" + a);\n  if(a) aliases[a] = k;\n});","typeGuard":"null","tryCatchPattern":"try { metaService.__configure(map); } catch(e) { if(/already taken/.test(e.message)) { console.warn(e.message); } else { throw e; } }","preventionTips":["Namespace aliases per plugin to avoid collisions","Grep config for an alias before adopting it"],"tags":["alias-conflict","module-configuration","duplicate"],"backgroundTag":"conflicting-config-options","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"}