You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
pawod
changed the title
Missing export statement for NgcCookieOptions
Missing export of NgcCookieOptionsMay 28, 2019
Bug Report or Feature Request (mark with an
x
)CookieConsent and Library Versions?
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
likeimport { NgcCookieOptions } from 'ngx-cookieconsent';
adding
NgcCookieOptions
to the export statement ofindex.ts
fixes the compiler errors but during runtime it turns out that it could not be foundThe log given by the failure
Compiler error before adding to export statement:
While running the application
Error displayed in Chrome:
Desired functionality
NgcCookieOptions
should be exportedThe text was updated successfully, but these errors were encountered: