Reputation: 56
I installed a package "ngx-custom-validator" to my project (Angular 11) it is working properly.
After I have upgraded my project to Angular 12, Now I am facing the problems with "ngx-custom-validator"
Error below:
_Namespace '"***/node_modules/ngx-custom-validators/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
AND
4257 static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<ɵInternalFormsSharedModule, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor,typeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioControlValueAccessor, typeof NgControlStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof CheckboxRequiredValidator, typeof EmailValidator], never, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor, typeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioControlValueAccessor, typeof NgControlStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof CheckboxRequiredValidator, typeofEmailValidator]>;
I think the recent developer who use this package also have this problems too, if any solution please share.
Thank in advance
Upvotes: 2
Views: 3366
Reputation: 33
It's related to https://github.com/rsaenen/ngx-custom-validators.
It should be updated to Angular 12.
There is a pull request for fixing the problem but It has not been applied for a long time. I created my package to use it
https://www.npmjs.com/package/@narik/custom-validators
Upvotes: 1
Reputation: 41
Use version: "ngx-custom-validators": "8.0.0"
It worked for me.
Upvotes: 4
Reputation: 912
The issue that your are facing now is internally related to ngx-custom-validators lib. I Suggest you to follow this issue here https://github.com/rsaenen/ngx-custom-validators/issues/60 to get a fix or a workaround.
Upvotes: 0