pentaho/pentaho-kettle · error · Error
Argument 'deps' is required.
Error message
Argument 'deps' is required.
What it means
The `promise` helper of the requireJS shim loads a set of AMD modules and returns a promise rejecting on loader errors (undefined module, timeout). It requires the dependency list as its first argument; ArgumentRequiredError is avoided to prevent a circular dependency with Base.js.
Solutions
- Pass an array of module ids as the first argument to promise()
- Ensure the variable holding the deps list is initialized (default to []) before the call
- Add an early guard in the calling code throwing a clearer, contextual error
Example fix
// before requireJS.promise(); // after requireJS.promise(['pentaho/util/Base']);
Defensive patterns
Strategy: validation
Validate before calling
if (!Array.isArray(deps)) throw new TypeError("promise() requires an array of module ids"); Type guard
function isDepsArray(deps) { return Array.isArray(deps); } Try / catch
try { await requireJS.promise(deps); } catch (e) { /* module loader error: log deps used */ } Prevention
- Default dynamic deps to an empty array before calling promise()
- Never build deps arrays with possibly-undefined spread sources
When it happens
Trigger: Calling `pentaho/util/requireJS.promise()` with no arguments or with `null`/`undefined` as the deps argument.
Common situations: Building the deps array conditionally and passing undefined; refactoring call sites and dropping the first argument; dynamic module loading code with an uninitialized array variable.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Argument 'id' is required.
- Alert dialog cancelled by user.
- Argument of TRUNC of date has to be between 0 and 5
- Argument of TRUNC of date has to be between 0 and 5
- Can't convert a string to a date
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/ccd42c1fa8eeff4c.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core-ui/src/main/resources/app/pentaho/util/requireJS.js:93
* When `deps` is an `Array`, zero or more modules are required,
* and the promise is fulfilled with an array with the values of those modules.
*
* Optionally, receives a contextual `require` function,
* so that module ids are taken relative to its module's folder.
*
* @param {string|Array.<string>} deps A single module id or an array of module ids.
* @param {?function} [relativeRequire] A contextual require function.
* Defaults to the global `require` function of the current Require JS context.
*
* @return {Promise|Promise.<Array>} A promise that
* is fulfilled with the value of the requested module(s), and
* is rejected in case a module loader error occurs (like an undefined module or timeout).
*/
promise: function(deps, relativeRequire) {
if(deps == null) {
// Cannot use ArgumentRequiredError, or a cycle would occur, as it is based in Base.js and
// the latter uses this.
throw new Error("Argument 'deps' is required.");
}
var requireFun = relativeRequire || context.require;
if(Array.isArray(deps)) {
return new Promise(function(resolve, reject) {
requireFun(deps, function() {
resolve(A_slice.call(arguments));
}, reject);
});
}
return new Promise(function(resolve, reject) {
requireFun([deps], resolve, reject);
});
},
/**View on GitHub (pinned to f3058517a1)