pentaho/pentaho-kettle · error · ArgumentInvalidError

A module with id ' ' is not defined.

Error message

A module with id '{idOrAlias}' is not defined.

What it means

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.

Solutions

  1. Correct the dependency id/alias spelling in the module spec.
  2. Ensure the module providing the dependency is defined/loaded before this module.
  3. Check plugin/module registration order and that required modules are on the requirejs paths.

Example fix

// before
{"my/view": {"type": "pentaho/viz/impl/barrChart"}} // typo
// after
{"my/view": {"type": "pentaho/visual/impl/barChart"}}
Defensive patterns

Strategy: validation

Validate before calling

deps.forEach(function(d) {
  if(metaService.get(d.id || d) === null) throw new Error("undefined dependency: " + (d.id || d));
});

Type guard

null

Try / catch

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; } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/347e2e42e43c5b53. Report an issue: GitHub.

Appendix: source

Thrown at plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js:138

            if(alias !== null && alias !== id) {
              if(this.__get(alias) !== null || O.hasOwn(preparedModuleSpecMap, alias)) {
                throw new ArgumentInvalidError(
                  "moduleSpecMap",
                  "Module with id '" + id + "' specifies an alias which is already taken: '" + alias + "'.");
              }

              preparedModuleSpecMap[alias] = moduleSpec;
            }
          }
        }

        function moduleResolver(idOrAlias, expectedKind) {

          var module = me.__get(idOrAlias);
          if(module === null) {
            var preparedModuleSpec = O.getOwn(preparedModuleSpecMap, idOrAlias, null);
            if(preparedModuleSpec === null) {
              throw new ArgumentInvalidError(
                "moduleSpecMap",
                "A module with id '" + idOrAlias + "' is not defined.");
            }

            module = createModule(preparedModuleSpec);
          }

          if(expectedKind && module.kind !== expectedKind) {
            throw new ArgumentInvalidError(
              "moduleSpecMap",
              "Expected module '" + module.id + "' to be " + (expectedKind === "type" ? "a " : "an ") + expectedKind);
          }

          return module;
        }

        function createModule(preparedModuleSpec) {

View on GitHub (pinned to f3058517a1)