> For the complete documentation index, see [llms.txt](https://docs.aurelia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aurelia.io/developer-guides/error-messages/0001-to-0023/aur0014.md).

# AUR0014

Key cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI? A common cause is circular dependency with bundler, did you accidentally introduce circular dep

### **Error message**

Key cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI? A common cause is circular dependency with bundler, did you accidentally introduce circular dependency into your module graph?

### Error explanation

This error occurs when a `null` or `undefined` key is used in a DI container operation, such as `container.get(key)` or `container.register(key, ...)`. Dependency Injection keys must always be defined and valid.

### Common causes

* A circular dependency or bundler issue (e.g., Webpack) results in a key being `undefined` at runtime.
* A typo or incorrect import leads to a missing or undefined key.
* Attempting to register or resolve a dependency before it is defined.
* Plugins or libraries that incorrectly provide a null/undefined key.

### How to fix

* Ensure all keys used in DI registration and resolution are defined and not null/undefined.
* Check for circular dependencies in your module graph, especially with bundlers.
* Double-check imports and the order of registration.
* If using plugins, ensure they are not introducing null/undefined keys.

### Debugging tips

* Check the stack trace to see where the null/undefined key was used.
* Search your codebase for all registrations and resolutions of the key in question.
* If using a bundler, look for circular dependencies or import issues.
* If using plugins, try disabling them one at a time to isolate the source.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0001-to-0023/aur0014.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
