Troubleshooting
A module fails to load
Module.setup/Module.init load modules recursively based on each module's Dependencies array. If a
dependency name doesn't resolve to a loaded module, bootstrap throws ModuleNotLoadedError. A module missing
required properties (no ModuleName, no setup function) throws InvalidModuleDefinitionError.
A hook callback throws but boot continues
This is expected: callbacks for each lifecycle step run sequentially in registration order, and an error in
one callback is logged (getLogger().error(...)) without stopping the remaining callbacks for that step.
Check the logs for the failing hook's error, not for a rejected Module.boot() promise.
Boot steps are slow and I can't tell why
Enable debug logging. Bootstrap logs timing information for each hook callback and each module's setup call
when the logger's debug level is enabled, which helps identify slow boot steps.
Restart doesn't pick up new setup options
restart() reloads from the IQBootstrapSetup object passed to the most recent Module.setup(...) call, not
from a fresh set of options. Call Module.setup(...) again with the new options before calling restart(),
or pass the updated options directly if your application wraps restart().
Common Errors
@quik/bootstrap has two module-specific errors, both plain QErrors with static (non-translated) messages:
ModuleNotLoadedError: a module (or one of its declaredDependencies) was not loaded before use.InvalidModuleDefinitionError: a module definition passed toModule.setupis missing required properties.
Bootstrap's locale files also ship translations for error keys owned by @quik/core (used while loading
modules and reading configuration/environment values):
quik.errors.features.feature.does-not-exists/exists/invalid/no-instance/no-instance-update.quik.errors.module.no-folders-defined/not-found.quik.errors.utils.invalid-filter-definition/invalid-parameter/invalid-parameter-type/missing-app-key/unable-to-read-folder.