AUR9991
Error Message
AUR9991: Invalid @children usage. @children decorator can only be used on a field
Description
This error occurs when the @children decorator, used for querying child elements within a component's view, is applied incorrectly. The decorator is designed only to be used on class properties (fields).
Cause
The direct cause is applying the @children decorator to something that is not a class property. Examples include:
Decorating a Method: Applying
@childrento a method definition.Decorating a Class: Applying
@childrendirectly to the class declaration.Decorating a Getter/Setter: Applying
@childrento an accessor property.
Solution
Ensure that the @children decorator is only applied directly to a class property declaration.
Example
Debugging Tips
Review the code where the
@childrendecorator is used.Verify that the decorator is placed directly above a property declaration (e.g.,
items: HTMLElement[];).Ensure the decorator is not applied to methods, getters, setters, or the class itself.
Last updated
Was this helpful?