Skip to content

ng add fails with Angular 19 projects #2773

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

Open
1 of 2 tasks
stephanrauh opened this issue Jan 27, 2025 · 3 comments
Open
1 of 2 tasks

ng add fails with Angular 19 projects #2773

stephanrauh opened this issue Jan 27, 2025 · 3 comments
Assignees
Labels
22 23 bug Something isn't working Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it.

Comments

@stephanrauh
Copy link
Owner

stephanrauh commented Jan 27, 2025

  • The structure of the angular.json has changed. The ng add schematics tries to add the assets at the old position and fails.
  • New projects don't have an assets folder. Instead, they have a public folder. The schematics should be able to detect that.
@stephanrauh stephanrauh self-assigned this Jan 27, 2025
@stephanrauh stephanrauh added bug Something isn't working 22 Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it. labels Jan 27, 2025
@stephanrauh
Copy link
Owner Author

The first part of the bugfix has landed with version 23.3.9. However, it populates both the old and the new subtree of the angular.json.

@RichardBoyder
Copy link

Does this plugin work with angular 19+ now?

@stephanrauh
Copy link
Owner Author

If you're referring to the PDF viewer: yes, it's fully compatible with Angular 19.
As for the schematics: it also works, but depending on your project structure, it can't copy the example file to the public folder. If you're still using the old src/assets folder, it works. You might want to double-check the changes in the angular.json. When I tried yesterday, it did two changes where I expected only a single change.

@stephanrauh stephanrauh added the 23 label Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
22 23 bug Something isn't working Confirmed I've managed to reproduce the bug. That's great news: chances are I'll solve it.
Projects
None yet
Development

No branches or pull requests

2 participants