AUR0003

Cyclic dependency found: name

Error message

Cyclic dependency found: name

Parameters

Name of the key being resolved

Error explanation

Cyclic dependencies found. This means that you have tried including a dependency in your application that is trying to include the dependency you're loading. **** This happens when there is a dependency graph that looks like this: A --> B --> A or A --> B --> C --> A

Possible solutions

Check your code and extract what in A that causes the cyclic dependencies into a separate file, and refer to that from both A and B

You can also use a getter and static inject to work around this issue:

class Circular {
  get inject() { return [ICircularDep] }
}

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