Angular 9 Ivy compilation error
See original GitHub issueExpected Behavior
Compile properly on Angular 9
Actual Behavior
Compilation fails with error:
`ERROR in node_modules/ngx-cookie-service/lib/cookie.service.d.ts:3:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (ngx-cookie-service) which declares CookieService has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library’s authors to see if the library is expected to be compatible with Ivy.
3 export declare class CookieService { `
Steps to Reproduce the Problem
Error occurs at ng run, prevents app from loading
Specifications
Using Angular 9 (9.1.6). Using latest library version 3.4.0, tried rolling back to 3.0.3 with same result.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
I don’t remember how, but I got it working back in May. Perhaps I had deleted node_modules? Oddly I didn’t put anything in my notes or update this issue, perhaps since I wasn’t sure what resolved it. I am using v3.0.3.
Change target: “es5” to es2015 will resolve this issue