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

Incorrect peer dependency range #238

Open
szuperaz opened this issue Feb 16, 2023 · 0 comments
Open

Incorrect peer dependency range #238

szuperaz opened this issue Feb 16, 2023 · 0 comments
Milestone

Comments

@szuperaz
Copy link

Hi,

The peer dependency range inside the lib's pacakge.json seems to be incorrect:

"peerDependencies": {
  "@angular/common": ">=7.2.0",
  "@angular/core": ">=7.2.0"
}

When installing version1.5.0 inside an Angular@12 package this runtime error occurs:

This application depends upon a library published using Angular version 14.0.6, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.

This is a related issue from Angular: angular/angular#46748 - especially this comment: angular/angular#46748 (comment), which explains that if a library is built with version 14 it won't be compatible with older versions of Angular.

I believe this error was introduced in version 1.5.0 when Angular was updated to version 14, and the library was compiled using Angular 14, technically making the release a breaking change.

For now, I can use 1.4.0 instead of ^1.4.0 but I believe for future releases it's cleaner if these updates are marked as breaking changes and the peer dependency range is correctly specified in pacakge.json.

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

2 participants