Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 19 Compatibility issue #1166

Open
rcrafael opened this issue Dec 9, 2024 · 6 comments
Open

Angular 19 Compatibility issue #1166

rcrafael opened this issue Dec 9, 2024 · 6 comments

Comments

@rcrafael
Copy link

rcrafael commented Dec 9, 2024

After upgrading from Angular 18 to 19, I got issue in the ng2-pdf-viewer dependency PDFJS-DIST.
I already tried removing the caret(^) and downgrading this ng2-pdf-viewer from 10.4.0 to 10.2.2 (which is working in angular 18 previously) but still got the same error from the pdfjs-dist after serving the angular app.

anyone run into the same issue? or someone know the fix for this?

image

@dzonatan
Copy link

dzonatan commented Dec 9, 2024

it seems to be angular-cli fault: angular/angular-cli#29077
I see they're working on a patch already

@joewIST
Copy link

joewIST commented Dec 10, 2024

@rcrafael A workaround is to add the packages to the externalDependencies array in the build options, e.g.:
"externalDependencies": [ "http", "https", "url", "util", "fs" ]

@shamoon
Copy link
Contributor

shamoon commented Dec 10, 2024

I think this can be closed, the angular change above was merged and will presumably be released soon. The above only happens in certain situations I believe anyway.

Compatibility between Angular 18 and v10.4 of this package is covered in a separate issue already.

@rcrafael
Copy link
Author

rcrafael commented Dec 10, 2024

@rcrafael A workaround is to add the packages to the externalDependencies array in the build options, e.g.: "externalDependencies": [ "http", "https", "url", "util", "fs" ]

i have tried this workaround but i got different error after serving the application.
image

@dzonatan
Copy link

for the time being you can downgrade the @angular-devkit/build-angular to 19.0.3

@rcrafael
Copy link
Author

for the time being you can downgrade the @angular-devkit/build-angular to 19.0.3

actually, i ended up downgrading to angular 18, i will wait for the version 19 to be stable.

thank for the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants