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

getting error when building the app

Open yabasha opened this issue 2 years ago • 5 comments

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [X] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

I have the following version

Angular CLI: 7.3.4
Node: 10.19.0
OS: linux x64
Angular: 7.2.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.0
@angular-devkit/build-angular     0.13.0
@angular-devkit/build-optimizer   0.13.0
@angular-devkit/build-webpack     0.13.0
@angular-devkit/core              10.1.1
@angular-devkit/schematics        7.3.4
@angular/cdk                      7.3.3
@angular/cli                      7.3.4
@angular/material                 7.3.3
@angular/pwa                      0.1001.1
@ngtools/webpack                  7.3.0
@schematics/angular               7.3.4
@schematics/update                0.13.4
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0

I installed V6.4.1 and everything worked as expected when I run npm start but when I want to build the app npm run build I get the following error:

ERROR in ./node_modules/ng2-pdf-viewer/fesm5/ng2-pdf-viewer.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined

Please advice,

yabasha avatar May 31 '22 16:05 yabasha

Most likely due to the typescript version, 6.4.1 was built with "typescript": "~3.6.5",

VadimDez avatar May 31 '22 19:05 VadimDez

Do you suggest update typescript? And to which version?

yabasha avatar May 31 '22 19:05 yabasha

Since you're using 6.4.1 try upgrading to at least "typescript": "~3.6.5" and see if you can build your project successfully.

VadimDez avatar May 31 '22 20:05 VadimDez

do you suggest other version of ng2-pdf-viewer that will work with Angular 7.2.7, because when I tried to update typescript version it generated ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 3.6.5 was found instead

yabasha avatar Jun 07 '22 10:06 yabasha

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 10 '22 04:08 stale[bot]