Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic 8 Angular - PrimeNG install error


I have version 18.0.0 of node and version 9.4.2 of npm, when I try to install PrimeNg: npm install primeng, this error is shown:


npm install primeng

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cannonerpweb_v2@8.1.9
npm ERR! Found: @angular/common@16.2.10
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^16.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.0.0" from primeng@14.2.14-lts
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!


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


May I know which version of Metronic Angular you are using? The latest version of PrimeNG supports Angular version 16. It appears that your Angular version is currently set to v14, which may be the cause of the dependency conflict you're encountering with PrimeNG. To resolve this, you may need to consider updating your Angular version to at least v16, which is compatible with the latest PrimeNG version. Alternatively, you can look for a version of PrimeNG that is compatible with your current Angular version.



Angular version 16.0.2"

{
"name": "cannonerpweb_v2",
"version": "8.1.9",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"rtl": "webpack --config=rtl.config.js",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.2",
"@angular/common": "^16.0.2",
"@angular/compiler": "^16.0.2",
"@angular/core": "^16.0.2",



You can try to update your global Angular installation to the latest version by running the following command:

npm install --global angular@latest

If you encounter any issues or if the update doesn't resolve your problem, you might also want to consider the following steps:

- Remove the node_modules folder in your project directory.
- Check for the presence of package-lock.json or yarn.lock files, and remove them if they exist.
- Once you've removed these files, you can proceed to reinstall your project dependencies using the following command: npm install


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(