pentaho/pentaho-kettle · error · pentaho.lang.OperationInvalidError
Invalid path: ' '.
Error message
Invalid path: '${id}'. What it means
The module id resolution utility (util.js resolveIdRelative) normalizes relative ids ('.' and '..' segments) against a base id. When a '..' segment tries to go above the root of the base id (baseIds.pop() returns undefined), the path cannot be resolved and OperationInvalidError is thrown.
Solutions
- Fix the relative id so '..' segments do not exceed the base path depth.
- Use an absolute module id (e.g. 'my/package/sub/module') instead of a deep relative path.
- Validate the resolved path depth against the base before calling the resolver.
Example fix
// before
resolveIdRelative('../../foo', 'pkg/mod'); // throws
// after
resolveIdRelative('./foo', 'pkg/sub/mod');
// or use absolute id
resolveIdRelative('pkg/sub/foo'); Defensive patterns
Strategy: validation
Validate before calling
var ups = (id.match(/\.\.\//g) || []).length;
var depth = baseId ? baseId.split('/').length : 0;
if (ups >= depth) throw new Error('Relative id escapes base: ' + id); Type guard
function isResolvableRelativeId(id, baseId) { return typeof id === 'string' && (id.charAt(0) !== '.' || (baseId && (baseId.split('/').length > (id.match(/\.\.\//g) || []).length))); } Try / catch
try { resolved = util.resolveId(id, baseId); } catch (e) { if (/Invalid path/.test(e.message)) { resolved = defaultModuleId; } else throw e; } Prevention
- Count '../' segments against the base path depth before resolving.
- Prefer absolute module ids in config and plugin descriptors.
- Avoid hand-building relative ids with string concatenation.
When it happens
Trigger: Resolving an id like '../../some/module' against a base id with too few path segments, e.g. base 'pkg/module' with '../..' — popping the last segment leaves nothing to pop.
Common situations: Hand-written relative AMD/requirejs module ids with excess '../' segments; config or plugin descriptors referencing modules relative to the wrong base; typos after refactoring module paths.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- Argument 'id' is required.
- Error retrieving badfile string
- Error retrieving controlfile string
- Error retrieving discardfile string
- Error retrieving fastload application string
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/30fb0ea9a4c2204f.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core-ui/src/main/resources/app/pentaho/module/util.js:89
absolutizeIdRelativeToSibling: function(id, siblingId) {
return this.absolutizeId(id, this.getBaseIdOf(siblingId));
},
absolutizeId: function(id, baseId) {
if(id && /^\./.test(id) && !/\.js$/.test(id)) {
var baseIds = baseId ? baseId.split("/") : [];
var ids = id.split("/");
var needsBase = false;
while(ids.length) {
var segment = ids[0];
if(segment === ".") {
ids.shift();
needsBase = true;
} else if(segment === "..") {
if(!baseIds.pop()) {
throw new OperationInvalidError("Invalid path: '" + id + "'.");
}
ids.shift();
needsBase = true;
} else {
break;
}
}
if(needsBase) {
baseId = baseIds.join("/");
id = ids.join("/");
return (baseId && id) ? (baseId + "/" + id) : (baseId || id);
}
}
return id;
},View on GitHub (pinned to f3058517a1)