angularprimeng

primeng: Install version for Angular 16.2.0


I installed angular 16.0.0 locally with:

npx -p @angular/cli@16.0.0 ng new Tester --no-standalone --routing

Then I tried to install primeng with:

npm install --save primeng 

I expected that a version suitable for angular 16.0.0 will be installed. I got:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tester@0.0.0
npm ERR! Found: @angular/common@16.2.12
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^16.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^17.0.0" from primeng@17.0.0-beta.1
npm ERR! node_modules/primeng
npm ERR!   primeng@"*" 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.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\990598\AppData\Local\npm-cache\_logs\2023-11-27T17_26_27_248Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\990598\AppData\Local\npm-cache\_logs\2023-11-27T17_26_27_248Z-debug-0.log

What am I doing wrong ?


Solution

  • The latest primeng point to the 17.0.0-beta.1.

    If you want to use it on Angular v16, install the latest 16 : npm install --save primeng@16.9.1 (there is no v16-lts tag yet)