tinesoft/ngx-cookieconsent

[Bug]

Stan92 opened this issue · 2 comments

Ngx-CookieConsent Version

2.2.3

CookieConsent Version

3.1.1

Angular CLI (or Nx CLI) Version

11.0.4

Node Version

No response

OS Version

Windows

Expected Behaviour

Actual Behaviour

I can't figure out why I get this error.
Any help?

VM78:30 ERROR TypeError: Cannot read properties of undefined (reading 'initialise')
    at NgcCookieConsentService.init (VM87 global-shortcut.js:234276:32)
    at new NgcCookieConsentService (VM87 global-shortcut.js:234237:14)
    at _createClass (VM87 global-shortcut.js:53680:20)
    at _createProviderInstance (VM87 global-shortcut.js:53650:26)
    at resolveNgModuleDep (VM87 global-shortcut.js:53611:21)
    at NgModuleRef_.get (VM87 global-shortcut.js:54164:16)
    at resolveNgModuleDep (VM87 global-shortcut.js:53631:29)
    at NgModuleRef_.get (VM87 global-shortcut.js:54164:16)
    at resolveDep (VM87 global-shortcut.js:54533:45)
    at createClass (VM87 global-shortcut.js:54418:32)

Steps to reproduce the behaviour

I've faced the same issue in one of our corrent projects.
You've probably missed a step like i did.
Add these to your angular.json and the error is gone.

Sidenote to the creators or contributors.
You should update the readme, with a sidenote that after some changes the json isn't called angular-cli.json but angular.json

Thanks @exitlol it works..