Angular: 7.2.1 ES6 class ReferenceError : Cannot access ‘X’ before initialization

I was getting this error due to a circular dependency, like

  • A injected with B
  • B injected with C
  • C injected with A

Removing the circular dependecy fixed this error.

Leave a Comment