Skip to content

DG007: Required module is missing ​

Thrown error
text
[datagrids DG007] Module `{name}` requires `{dep}`, which is not attached.

This is a wiring mistake: the grid throws an Error with this message instead of half-working.

When it happens ​

A module declares requires: ["…"] and no module with that name is attached. The check runs after all modules from the constructor's use are attached (thrown by the constructor) and, for grid.use(), in a microtask afterwards (an uncaught error in the console). Built-in case: button.resetState() requires state, the module name of stateSave().

How to fix it ​

Attach the dependency in the same use array; the order inside the array does not matter:

js
use: [stateSave(), button.resetState()]

Released under the MIT License.