intbot / ng2-pdfjs-viewer

An angular component for PDFJS and ViewerJS (Supports all versions of angular)
Apache License 2.0
228 stars 113 forks source link

Compatibility Angular 12 #164

Closed spikensbror closed 2 years ago

spikensbror commented 3 years ago

Could you update the peer dependency to angular/core from ^11.0.0 to ^12.0.0? We are currently stuck with our update of Angular until this is resolved.

ankurkoul92 commented 3 years ago

Even we want to upgrade our project to angular 12. But are stuck because of ng2-pdfjs-viewer package dependency. If you guys have plans for this please let us know, so that we can also plan our upgrade.

Let me know if I can be of some help on this. @codehippie1, @petebacondarwin , @szh, @anthonybriand and @flaviorocks

petebacondarwin commented 3 years ago

If the library works with v12 of Angular, then you could just ignore this peer dependency constraint @ankurkoul92. But you need to test it.

AnsonWooNexify commented 2 years ago

I tried in v12 of Angular, it shown nothing on the screen, anyone like me?

breadcrumbe commented 2 years ago

I tried in v12 of Angular, it shown nothing on the screen, anyone like me?

I have just upgraded one of my projects from Angular 11 to Angular 12 and I have ng2-pdfjs-viewer 6.01 - which is working 100% - although it did complain about the dep.

rogerfar commented 2 years ago

How about v13?

logerk46 commented 2 years ago

@rogerfar hi,

I have now tried ng2-pdfjs-viewer (6.0.2) with version 13 of Angular and everything works.

konstantinschuette commented 2 years ago

@rogerfar hi,

I have now tried ng2-pdfjs-viewer (6.0.2) with version 13 of Angular and everything works.

image

Are you sure about that?

pmenze commented 2 years ago

Same here. I was using nodejs 12 with angular 13 and ng2-pdfjs-viewer (6.0.2). after updating to node 16 it shows the same error as in the previous post by @konstantinschuette

konstantinschuette commented 2 years ago

Same here. I was using nodejs 12 with angular 13 and ng2-pdfjs-viewer (6.0.2). after updating to node 16 it shows the same error as in the previous post by @konstantinschuette

It seems like this project is inactive or rarely maintained. The package uses Angular 11, soo... we might have to choose another package... Looking 10 minutes into Google i found this: https://github.com/stephanrauh/ngx-extended-pdf-viewer The only thing that bothers me is, that the bundle size is significantly larger than this one.

Also that project is maintained, so I might give it a try.

codehippie1 commented 2 years ago

Please send in a pull request with angular upgrade if you can. I will merge and give you a build.

rogerfar commented 2 years ago

@konstantinschuette @pmenze I switched to https://github.com/VadimDez/ng2-pdf-viewer

pmenze commented 2 years ago

Please send in a pull request with angular upgrade if you can. I will merge and give you a build.

I tried to update your repo to ng13. The SampleApp worked using ng13 (using the "ng2-pdfjs-viewer-6.0.1.tgz" file). However I could not update the build itself... the gulp script refers to the angular compiler which seems not to work in ng13... https://github.com/intbot/ng2-pdfjs-viewer/blob/e4afd8ee44c76f8d44fdd17f48142dc613826c7c/gulpfile.js#L4

Maybe the project could be changed to use standard angular build tools for libraries instead of gulp?

konstantinschuette commented 2 years ago

Please send in a pull request with angular upgrade if you can. I will merge and give you a build.

I tried to update your repo to ng13. The SampleApp worked using ng13 (using the "ng2-pdfjs-viewer-6.0.1.tgz" file). However I could not update the build itself... the gulp script refers to the angular compiler which seems not to work in ng13...

https://github.com/intbot/ng2-pdfjs-viewer/blob/e4afd8ee44c76f8d44fdd17f48142dc613826c7c/gulpfile.js#L4

Maybe the project could be changed to use standard angular build tools for libraries instead of gulp?

Thanks for trying but I think this project is dead. I will switch to https://github.com/stephanrauh/ngx-extended-pdf-viewer

codehippie1 commented 2 years ago

@konstantinschuette @pmenze @logerk46 @AnsonWooNexify @spikensbror @ankurkoul92 I upgraded the whole thing to use latest ng-packager. It's more lean and abides latest angular packaging standards. - And works with all angular versions. I started versioning the package to match angular versions(Current is 13.2.2) which it has a peer dependency on.

Test it and let me know.

Again - Sorry for the late reply, getting covid and focusing on a non-profit took some time away from this project. Rest assured, I am here if you need any help.

Coming up - Smaller package size Parameterized configurations

shash7976 commented 2 years ago

Hi @codehippie1, Hope you are doing great now

I'm still facing this compatibility issue on the server

image

Package.json contain "ng2-pdfjs-viewer": "^6.0.2",

if I run npm update ng2-pdfjs-viewer on my local machine I get an error image

Could you please let me know what can be done...

TIA

codehippie1 commented 2 years ago

Which version are you using?

codehippie1 commented 2 years ago

Are you on latest version? I don't see any peer dependency to older packages image

codehippie1 commented 2 years ago

Also - this is a closed issue, create another one.

shash7976 commented 2 years ago

Thanks