need to use --legacy-peer-deps to run npm install
rudvfaden opened this issue · comments
I need to use --legacy-peer-deps
when I run npm install
to get the app to work. Is there a way to fix that?
Hi Rud - when did you clone the repo?
Do you have this file in your project? https://github.com/sasjs/angular-seed-app/blob/main/.npmrc
Yes
I tried creating a new app using the sas cli. It work without issues.
The angular version is however 13 in the template. The current version is 14. Should i update angular to version 14 when i create the project or will it breake?
Hi @rudvfaden - we've bumped both clarity and angular, and the legacy peer deps should not longer be needed.
Are you able to re-clone (or re-create using CLI) and confirm?
Got this error when trying to use npm install. Used sasjs create --template angular.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @clr/angular@13.5.0
npm ERR! Found: @angular/common@14.1.0
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^14.1.0" from the root project
npm ERR! peer @angular/common@"^13.0.0 || ^14.0.0-0" from @angular/cdk@13.3.9
npm ERR! node_modules/@angular/cdk
npm ERR! @angular/cdk@"^13.3.8" from the root project
npm ERR! 4 more (@angular/forms, @angular/platform-browser, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.0.0" from @clr/angular@13.5.0
npm ERR! node_modules/@clr/angular
npm ERR! @clr/angular@"^13.5.0" from the root project
npm ERR! peer @clr/angular@"13.5.0" from @clr/ui@13.5.0
npm ERR! node_modules/@clr/ui
npm ERR! @clr/ui@"13.5.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/common@13.3.11
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"^13.0.0" from @clr/angular@13.5.0
npm ERR! node_modules/@clr/angular
npm ERR! @clr/angular@"^13.5.0" from the root project
npm ERR! peer @clr/angular@"13.5.0" from @clr/ui@13.5.0
npm ERR! node_modules/@clr/ui
npm ERR! @clr/ui@"13.5.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.
npm ERR!
npm ERR! See /home/JB4555/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/JB4555/.npm/_logs/2022-07-21T13_35_28_160Z-debug-0.log
I investigated more, and the issue is in @clr/angular library.
@rudvfaden Can you confirm your steps:
- sasjs create --template angular
- npm install
Is that correct?
If so, in the npm install
step as a workaround you just call this:
npm install --legacy-peer-deps
Please do let me know if that worked for you.
@rudvfaden Ok great, sorry for the small delay, I misinterpreted the issue at first, should've suggested that flag
right away.
@rudvfaden - I'm going to re-open this issue. We can't support the removal of the --legacy-peer-deps option due to it not being supported by our dependency: @clr/angular
So in the meantime we recommend re-setting the flag in .npmrc, apologies for the run-around
Hi Rud - this should be resolved once the Clarity framework updates to Angular 14, see this issue: vmware-clarity/ng-clarity#95
In particular, this comment: vmware-clarity/ng-clarity#95 (comment)
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on:
- GitHub release
v1.0.0
Your semantic-release bot 📦🚀
Bad bot
I no longer encounter this issue though and the issue mentioned above seems closed, so I guess this can be closed too?
Good point, thanks!
@all-contributors please add @rudvfaden for bug reports
I've put up a pull request to add @rudvfaden! 🎉