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

Install package from npm with Angular 17.2 #806

Open
xwanner opened this issue Feb 26, 2024 · 2 comments
Open

Install package from npm with Angular 17.2 #806

xwanner opened this issue Feb 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@xwanner
Copy link

xwanner commented Feb 26, 2024

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: theia-catalog@0.0.0
npm ERR! Found: @angular/common@17.2.2
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 geonetwork-ui@2.1.0
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/express-engine@16.2.0
npm ERR! node_modules/@nguniversal/express-engine
npm ERR!   peer @nguniversal/express-engine@"16.x || 17.x" from geonetwork-ui@2.1.0
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
@xwanner xwanner added the bug Something isn't working label Feb 26, 2024
@jahow
Copy link
Collaborator

jahow commented Feb 26, 2024

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!!

@xwanner
Copy link
Author

xwanner commented Feb 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants