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 14 compatibility #190

Closed
sgabb opened this issue Jul 15, 2022 · 17 comments · Fixed by #193
Closed

Angular 14 compatibility #190

sgabb opened this issue Jul 15, 2022 · 17 comments · Fixed by #193

Comments

@sgabb
Copy link

sgabb commented Jul 15, 2022

Hello, any plan to update compatibility and dependency to Angular 14?

@codehippie1
Copy link
Contributor

Soon, Will do in next couple of weeks

@MotassemJa
Copy link

Any updates on this? :)

@Kreash
Copy link

Kreash commented Aug 11, 2022

really want support for angular 14 =)

@dereekb
Copy link
Contributor

dereekb commented Aug 13, 2022

This is the last dependency I need for upgrading a project to Angular 14, so I'll probably start on a PR here soon. I don't believe there will be any particular changes between 13 and 14 that would cause any issues.

@codehippie1
Copy link
Contributor

I am out of country till school opening. But I should be able to merge changes from your PR. Please let me know once it is ready.

@dereekb dereekb mentioned this issue Aug 14, 2022
@dereekb
Copy link
Contributor

dereekb commented Aug 14, 2022

PR is created. Double check the changes, but all I did was bump the versions, create an ng-package.json file since they're required now apparently, merged those module declaration together, and ran build.

In the meantime if anyone is blocked by this you can pull down a special branch I've got that hosts the dist files directly:

"ng2-pdfjs-viewer": "git+https://[email protected]/dereekb/ng2-pdfjs-viewer#82b994d49db5406f64bc39229a04b3871b33d0b5",

Example of it working on my project:

Screen Shot 2022-08-14 at 12 34 45 AM

@hemant-parmar
Copy link

Awaiting for the update .. need it badly.. 4 apps affected.. Please help.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^14.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.2.2" from [email protected]
npm ERR! ng2-pdfjs-viewer@"*" from the root project

@hemant-parmar
Copy link

@dereekb

In the meantime if anyone is blocked by this you can pull down a special branch I've got that hosts the dist files directly:

You mean the given reference "ng2-pdfjs-viewer": "git+...." should be added to the package.json file under dependencies?

@MotassemJa
Copy link

@dereekb

In the meantime if anyone is blocked by this you can pull down a special branch I've got that hosts the dist files directly:

You mean the given reference "ng2-pdfjs-viewer": "git+...." should be added to the package.json file under dependencies?

Yes you can add it to your package.json. But this is a temporary solution

@hemant-parmar
Copy link

@dereekb
I used your link as a temp solution in package.json. But got the below error:
Error: NG04002: Cannot match any routes. URL Segment: 'assets/pdfjs/web/viewer.html'

Note that I have the below in the angular.json file's options-assets (it was there for the prev version's implementation)
{ "glob": "**/*", "input": "node_modules/ng2-pdfjs-viewer/pdfjs", "output": "/assets/pdfjs" }

Then I manually copied the the node_modules/ng2-pdfjs-viewer/pdfjs folder to the assets folder and then it worked.
But is this the right way?
I was not required to do this manual copy-paste earlier. Did I miss anything in implementing the temp solution?

@dereekb
Copy link
Contributor

dereekb commented Aug 22, 2022

Edit: Misread. The README states you need to manually copy this folder. So yes, you are correct.

https://github.com/intbot/ng2-pdfjs-viewer/blob/25973eb38d3676666c09f38b045fd85334a18f41/README.MD#step-2-copy-task-for-pdfjs

## Step 2: Copy task for pdfjs
For several advanced options to work, you need a copy of pdfjs from this npm package.
Edit your project's `angular.json` file and use `ng build` as described here https://angular.io/guide/workspace-config#project-asset-configuration 
```json
"assets": [
  { "glob": "**/*", "input": "node_modules/ng2-pdfjs-viewer/pdfjs", "output": "/pdfjs" },
]

_Please note, you may manually Copy `node_modules\ng2-pdfjs-viewer\pdfjs` to your `public` or `asset` folder or use any copy script as part of your build process.

I change the word "may" to "must" in my PR to hopefully reduce confusion in the future.

@Laurens-makel
Copy link

Any updates on when this will be released?

@codehippie1
Copy link
Contributor

I will return from vacation on Sep 12th. I could merge this the same week. Anyone interested in being a maintainer, let me know, would be happy to share the responsibilities.

@NotTheSamAdamsGuy
Copy link

Any updates on the release for this? Thank you!

@Toso82
Copy link

Toso82 commented Sep 26, 2022

When exit new release?

@codehippie1
Copy link
Contributor

@dereekb @Toso82 @NotTheSamAdamsGuy @Laurens-makel @hemant-parmar @sgabb @MotassemJa @Kreash New version is released with Angular 14. Also - Sample app and local deployment scripts are updated.

I am extremely sorry about the delay, I was out of country for a while and got back last week.
On a side note @dereekb - Would you like to have permission to merge pull requests? From the looks of it - You went through the code already. I could certainly use a backup in my absence.

@sgabb
Copy link
Author

sgabb commented Sep 26, 2022

Thanks, that's great!

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

Successfully merging a pull request may close this issue.

9 participants