AUR0767
Error Message
AUR0767: Aurelia.root was accessed without a valid root.
Description
The root property needs either a current application root or one configured for the next start. Calling app(...) creates that configuration. The property is available immediately and remains available throughout startup.
This state commonly occurs on a fresh Aurelia instance or after stop(true) disposed the configured root.
Solution
Configure the root before reading it:
import Aurelia from 'aurelia';
import { MyApp } from './my-app';
const aurelia = new Aurelia().app({
host: document.querySelector<HTMLElement>('#app')!,
component: MyApp,
});
const root = aurelia.root;
await aurelia.start();Call app(...) again before a later start when the previous root was disposed.
Last updated
Was this helpful?