x)- [ 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
When building on latest (v6.1.0) I get the following error. Once reverting back to v6.0.2 I no longer get this error.
ERROR in ../node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.component.d.ts:51 - error An accessor cannot be declared in an ambient context.
Could you please specify which version of TypeScript you're using in your project?
I'm not near a pc right now, but for what I can see on my mobile, this is in our dev dependencies:
"typescript":聽"3.5.3",
"typescript-formatter":聽"^7.2.2"
So it seems like there's a breaking change in the typescript library.
After the upgrade to Angular 9, Typescript was updated to the lates version (3.7), which seems to be incompatible with version 3.5.
Try to stick with 6.0.2 of ng2-pdf-viewer in your project for now
Alrighty, I'll do that until I can get around to updating Angular and TypeScript, thanks!
I faced same issue with typescript 3.5.3, ng2-pdf-viewer at 6.1.0 and Angular v8.2
Same for me.
"ng2-pdf-viewer": "6.1.0",
"typescript": "~3.4.3",
"@angular/core": "~8.1.2",
Can you please try out the 6.1.1 version?
@VadimDez, now it works. Thank you!
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.
Most helpful comment
So it seems like there's a breaking change in the typescript library.
After the upgrade to Angular 9, Typescript was updated to the lates version (
3.7), which seems to be incompatible with version3.5.Try to stick with
6.0.2ofng2-pdf-viewerin your project for now