# AUR0088

### **Error message**

AttributeParser is already initialized; cannot add patterns after initialization.

### **Parameters**

None

### Error explanation

This error occurs when you attempt to register a new attribute pattern (`IAttributeParser.registerPattern`) after the attribute parser has already been initialized. Initialization happens automatically the first time an attribute is parsed (`IAttributeParser.parse`). Once initialized, the parser's patterns are fixed and cannot be changed.

### Common causes

* Trying to register attribute patterns dynamically after the application has started compiling templates.
* Calling `IAttributeParser.registerPattern` in response to an event or user action after initial template compilation.

### How to fix

* Ensure all attribute patterns are registered before any template compilation begins. The best place for this is typically during application startup or configuration.
* Register patterns via the `@attributePattern` decorator or by providing them to the container configuration, rather than calling `registerPattern` manually after initialization.

### Debugging tips

* Check the stack trace to identify where the late registration attempt is happening.
* Verify the order of operations during application startup to ensure patterns are registered before parsing/compilation starts.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0088-to-0723/aur0088.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
