tinesoft / ngx-cookieconsent

Cookie :cookie: Consent module for Angular.
https://tinesoft.github.io/ngx-cookieconsent/
MIT License
164 stars 35 forks source link

[Bug] #118

Closed Stan92 closed 2 years ago

Stan92 commented 2 years ago

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

-

exitlol commented 2 years ago

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

Stan92 commented 2 years ago

Thanks @exitlol it works..