ng2-pdfjs-viewer icon indicating copy to clipboard operation
ng2-pdfjs-viewer copied to clipboard

Support Ivy build

Open CobusKruger opened this issue 5 years ago • 1 comments

I included ng2-pdfjs-viewer in a library, which I published to a private repository. When I then tried to do an Angular 9 Ivy build, I get this error:

Error: Failed to compile entry-point my-package (es2015 as esm2015) due to compilation errors:
node_modules/my-package/node_modules/ng2-pdfjs-viewer/index.d.ts:3:22 - error NG6002: Appears in the NgModule.imports of MyPackageModule, but could not be resolved to an NgModule class.

This likely means that the library (ng2-pdfjs-viewer) which declares PdfJsViewerModule 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 PdfJsViewerModule {

This is the money shot:

This likely means that the library (ng2-pdfjs-viewer) which declares PdfJsViewerModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy.

I'm using [email protected], on Angular 9.1.7.

CobusKruger avatar May 17 '20 12:05 CobusKruger

@CobusKruger Should be fixed after a pull request by angular cc. Please check and let me know if this is still an issue

codehippie1 avatar Jul 27 '20 20:07 codehippie1