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

PrimeNG 11 requires Angular < 11 #9626

Closed
bjansen opened this issue Dec 8, 2020 · 1 comment
Closed

PrimeNG 11 requires Angular < 11 #9626

bjansen opened this issue Dec 8, 2020 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@bjansen
Copy link

bjansen commented Dec 8, 2020

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Version 11 requires Angular 7/8/9/10, but does not accept 11 :(

I get an error with NPM 7.0.14 / node.js 15.x:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^11.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" from [email protected]
npm ERR! node_modules/primeng
npm ERR!   primeng@"^11.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

And a warning with NPM 6.14.8 / node.js 14.x:

npm WARN [email protected] requires a peer of @angular/core@^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/forms@^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 but none is installed. You must install peer dependencies yourself.

Expected behavior
PrimeNG 11 should work with Angular 11, as per the release announcement.

Unzipping https://registry.npmjs.org/primeng/-/primeng-11.0.0.tgz, I can see the following in package.json:

  "peerDependencies": {
    "@angular/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
    "@angular/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
    "@angular/forms": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
    "rxjs": "^6.0.0",
    "zone.js": "^0.10.2"
  },
  • Angular version: 11.0.3

  • PrimeNG version: 11.0.0

@bjansen
Copy link
Author

bjansen commented Dec 8, 2020

Ah, there was a breaking change regarding peer dependencies conflicts, what was a warning in NPM <= 6 is now an error in NPM 7, see https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major

BREAKING CHANGE: this can cause some packages to not be installable, if they have unresolveable peer dependency conflicts. While the correct solution is arguably to fix the conflict, this was not forced upon users for several years, and some have come to rely on this lack of correctness. Use the --legacy-peer-deps config flag if impacted.

@yigitfindikli yigitfindikli self-assigned this Dec 8, 2020
@yigitfindikli yigitfindikli added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Dec 8, 2020
@yigitfindikli yigitfindikli added this to the 11.1.0 milestone Dec 8, 2020
@yigitfindikli yigitfindikli modified the milestones: 11.1.0, 11.1.0-rc.1 Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants