ng2-pdf-viewer
ng2-pdf-viewer copied to clipboard
Getting Error after install this package
Generic type 'ɵɵComponentDeclaration' requires between 7 and 9 type arguments
Error: node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:95:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 9 type arguments.
95 static ɵcmp: i0.ɵɵComponentDeclaration<PdfViewerComponent, "pdf-viewer", never, { "src": { "alias": "src"; "required": false; }; "cMapsUrl": { "alias": "c-maps-url"; "required": false; }; "page": { "alias": "page"; "required": false; }; "renderText": { "alias": "render-text"; "required": false; }; "renderTextMode": { "alias": "render-text-mode"; "required": false; }; "originalSize": { "alias": "original-size"; "required": false; }; "showAll": { "alias": "show-all"; "required": false; }; "stickToPage": { "alias": "stick-to-page"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomScale": { "alias": "zoom-scale"; "required": false; }; "rotation": { "alias": "rotation"; "required": false; }; "externalLinkTarget": { "alias": "external-link-target"; "required": false; }; "autoresize": { "alias": "autoresize"; "required": false; }; "fitToPage": { "alias": "fit-to-page"; "required": false; }; "showBorders": { "alias": "show-borders"; "required": false; }; }, { "afterLoadComplete": "after-load-complete"; "pageRendered": "page-rendered"; "pageInitialized": "pages-initialized"; "textLayerRendered": "text-layer-rendered"; "onError": "error"; "onProgress": "on-progress"; "pageChange": "pageChange"; }, never, never, false, never, false>;
That's all details, and I am getting this error after I install package and Import in module file
What version of Angular are you using? e.g. https://stackoverflow.com/questions/72701446/error-ts2314-generic-type-%C9%B5%C9%B5componentdeclaration-requires-7-type-arguments
I am using angular version 16 and do we need fontAwesome for this package?
Ha, no I dont mean you need fontawesome just that the error has come up in other projects due to angular version mismatch. Im using the plugin in v16 without any issues. A few of the SO threads seem to indicate an issue with the angular version not being updated https://stackoverflow.com/questions/74616687/error-ts2707-generic-type-%C9%B5%C9%B5directivedeclaration-requires-between-6-and-8-type https://stackoverflow.com/questions/73024384/how-can-i-fix-error-ts2314-generic-type-%C9%B5%C9%B5directivedeclaration-requires-6-typ but not sure, just trying to help
node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:95:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 9 type arguments.
Maybe It will help
I am encountering the same issue with ng version 15
Yeap ,these issue are popping in Angular 15 and as well as 16 too. I think the pdf viewer need some adjustments with latest frameworks and typescript
Hi guys, any update on this I am facing the same issue.
same with angular 16
Same issue with angular 15. Anyone figure out a way around it?
facing same problem with angular 16
Same issue I am facing
How can I resolve It for angular 15.2.9?
Same here, but using Angular v12
Same here, using Angular v14
pegging the version to this helped me. I just migrated my app to Angular 15 from 14.
{
...
"ng2-pdf-viewer": "9.1.5",
...
}
Si, al cambiar la version de la librería funciona correctamente.
Si, al cambiar la version de la librería funciona correctamente.
bkn :)
Desinstale mi versión actual la cual era la 10.0.0 e instale la versión 9.1.5 Y se soluciono el problema.