geonetwork-ui
geonetwork-ui copied to clipboard
Install package from npm with Angular 17.2
Starting from a fresh new project with node 20.9 and angular 17.2, I cannot install geonetwork-ui from npm.
The command : npm install --save geonetwork-ui
Returns :
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@"^17.2.0" from the root project
npm ERR! peer @angular/common@"16.x || 17.x" from [email protected]
npm ERR! node_modules/geonetwork-ui
npm ERR! geonetwork-ui@"*" from the root project
npm ERR! 8 more (@angular/cdk, @angular/forms, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^16.0.0 || ^16.1.0-next.0" from @nguniversal/[email protected]
npm ERR! node_modules/@nguniversal/express-engine
npm ERR! peer @nguniversal/express-engine@"16.x || 17.x" from [email protected]
npm ERR! node_modules/geonetwork-ui
npm ERR! geonetwork-ui@"*" 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! /home/ubuntu/.npm/_logs/2024-02-26T10_47_45_778Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2024-02-26T10_47_45_778Z-debug-0.log
Hi, thanks for your interest in the project!
It looks like not specifying an option when doing npm i geonetwork-ui
will try to pull the version tagged latest
(see https://www.npmjs.com/package/geonetwork-ui?activeTab=versions). This version hasn't been updated in a few months and to have anything working you would need to do npm i geonetwork-ui@dev
.
Please keep in mind that the dev version is updated on every commit in the main
branch of the project, so things might change quickly and without notice. Also, we would be very interested in hearing from your experience while using the NPM package, thanks!!
Thank you for your help,
Indeed with the @dev flag it did the trick.
I will try to work with this npm version and I will keep you informed if anything go wrong.