AUR0001
No registration for interface: xxxx
Error message
No registration for interface: xxxx
Parameters
Interface name
Error explanation
This error occurs when Aurelia's Dependency Injection (DI) container is asked to resolve a dependency using an interface key (created via DI.createInterface
) that has not been registered.
In Aurelia, an "interface" is not a TypeScript interface, but a unique symbol or key used to represent a contract for a dependency.
Common causes
You forgot to register the interface with the container.
There is a typo in the interface key.
A plugin or library expected to register the interface did not do so.
How to fix
Register the interface with the container, e.g.
container.register(MyInterface);
Double-check the key used in both registration and injection.
If using plugins, ensure they are properly configured and registered.
Debugging tips
Check the stack trace to see where the resolution was attempted.
Search your codebase for all registrations of the interface key.
Possible solutions
Ensure that you are registering your interface with Aurelia. This can be done inside of the register
method on the Aurelia instance or through the DI methods themselves.
Please also note that this error could be caused by a plugin and not your application. After ruling out that the error is not being caused by your code, try removing any registered plugins one at a time to see if the error resolves itself.
Last updated
Was this helpful?