Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing export of NgcCookieOptions #53

Closed
pawod opened this issue May 28, 2019 · 1 comment
Closed

Missing export of NgcCookieOptions #53

pawod opened this issue May 28, 2019 · 1 comment

Comments

@pawod
Copy link

pawod commented May 28, 2019

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

CookieConsent and Library Versions?

- cookieconsent version:        3.1.1
- ngx-cookieconsent version:    2.2.1

OS Version?

Windows 10

Angular, Node and al Versions?

Angular CLI: 7.3.9
Node: 10.15.3
OS: win32 x64
Angular: 7.2.15

@angular-devkit/architect 0.13.9
@angular-devkit/build-angular 0.13.9
@angular-devkit/build-optimizer 0.13.9
@angular-devkit/build-webpack 0.13.9
@angular-devkit/core 7.3.9
@angular-devkit/schematics 7.3.9
@angular/cli 7.3.9
@ngtools/webpack 7.3.9
@schematics/angular 7.3.9
@schematics/update 0.13.9
rxjs 6.3.3
typescript 3.2.4
webpack 4.29.0

npm 6.4.1

Repro steps

  • try to import and use NgcCookieOptions like
    import { NgcCookieOptions } from 'ngx-cookieconsent';

  • adding NgcCookieOptions to the export statement of index.ts fixes the compiler errors but during runtime it turns out that it could not be found

The log given by the failure

Compiler error before adding to export statement:

ERROR in src/app/app.component.ts(4,54): error TS2724: Module '"<project_root>/node_modules/ngx-cookieconsent/ngx-cookieconsent"' has no exported member 'NgcCookieOptions'

While running the application

WARNING in ./src/app/app.component.ts 23:52-68
"export 'NgcCookieOptions' was not found in 'ngx-cookieconsent'

Error displayed in Chrome:

ERROR TypeError: Cannot read property 'initialise' of undefined
at NgcCookieConsentService.push../node_modules/ngx-cookieconsent/esm5/ngx-cookieconsent.es5.js.NgcCookieConsentService.init (ngx-cookieconsent.es5.js:149)
at new NgcCookieConsentService (ngx-cookieconsent.es5.js:96)
at createClass (core.js:21265)
at createProviderInstance (core.js:21235)
at resolveNgModuleDep (core.js:21199)
at NgModuleRef
.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef
.get (core.js:21907)
at resolveDep (core.js:22278)
at createClass (core.js:22152)
at createDirectiveInstance (core.js:22029)
at createViewNodes (core.js:23255)

Desired functionality

NgcCookieOptions should be exported

@pawod pawod changed the title Missing export statement for NgcCookieOptions Missing export of NgcCookieOptions May 28, 2019
@tinesoft
Copy link
Owner

Hi @pawod ,

Thanks for using the library, and good catch!
Just released v2.2.2 with the fix :)

Happy hacking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants