angular-datepicker icon indicating copy to clipboard operation
angular-datepicker copied to clipboard

lib is incompatible with latest angular 12

Open papirosko opened this issue 2 years ago • 8 comments

"@angular/common": "^12.2.7", (at the time of writing there is also 12.2.16) gives the following:

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@"^12.2.7" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"12.1.2" from [email protected]
npm ERR! node_modules/ng2-date-picker
npm ERR!   ng2-date-picker@"12" 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! 

you should use ^ in peerDependencies

papirosko avatar Mar 31 '22 06:03 papirosko

@papirosko you should use the 12* version of this lib with ng12 app. Let me know if it works

vlio20 avatar Mar 31 '22 06:03 vlio20

I am:

npm install ng2-date-picker@12 --save the problem is that you have strict angular version 12.1.2 in peer dependencies, and should use smth like

"@angular/common": "^12.0.0"

here: https://github.com/vlio20/angular-datepicker/blob/12.0.4/package.json#L41

papirosko avatar Mar 31 '22 06:03 papirosko

Good point. Do you want to create a PR with a fix for that version?

vlio20 avatar Mar 31 '22 10:03 vlio20

no, switched to another datepicker...

papirosko avatar Mar 31 '22 11:03 papirosko

Hello, I am having the same problem. Can I create a PR to fix this? And reopen the ticket?

ArthurDrevot avatar Jul 20 '23 16:07 ArthurDrevot

Sure, reopenning.

vlio20 avatar Jul 21 '23 04:07 vlio20

PR : https://github.com/vlio20/angular-datepicker/pull/634

but I don't know which branch to merge on

ArthurDrevot avatar Jul 21 '23 08:07 ArthurDrevot

@vlio20 Can you create a new '12.0.5' branch from the '12.0.4' branch so that I can merge my branch into it?

Is it possible afterwards to create the version and push it to NPM?

ArthurDrevot avatar Jul 27 '23 08:07 ArthurDrevot