ngx-custom-validators icon indicating copy to clipboard operation
ngx-custom-validators copied to clipboard

NGX-CUSTOM-VALIDATOR **NOT WORK** After Upgrade Angular Version

Open kuth-chi opened this issue 4 years ago • 2 comments

IMPORTANT: After I have upgrade Angular CLI version from 11 to 12 There are issue below ` -``` _Namespace '"***/node_modules/ngx-custom-validators/node_modules/@an gular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

4257 static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<ɵInternalFormsSharedModule, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor, t ypeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioContro lValueAccessor, typeof NgControlStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof Checkb oxRequiredValidator, typeof EmailValidator], never, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor, typeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioControlValueAccessor, typeof NgCo ntrolStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof CheckboxRequiredValidator, typeof EmailValidator]>; ?_

  • _Namespace '"***/node_modules/ngx-custom-validators/node_modules/@an gular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

4258     static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<ɵInternalFormsSharedModule>;`


**Ngx-Custom-Validator version 11.0.1**

  - Not working on Angular CLI version 12

**Expected/desired behavior**

  - 

**Environment information**

  - OS: 
  - Angular Version: 
  - Typescript version:
  - npm version: 
  - Node Version: 

**Other information**

kuth-chi avatar Jul 02 '21 04:07 kuth-chi

What I did in the meantime to not update the library to ng12 was to update the library's own package.json: "@angular/common": "~12.1.1", "@angular/compiler": "~12.1.1", "@angular/core": "~12.1.1", "@angular/forms": "~12.1.1", "@angular/platform-browser": "~12.1.1", "@angular/platform-browser-dynamic": "~12.1.1",

"peerDependencies": { "@angular/common": "~12.1.1", "@angular/core": "~12.1.1", "@angular/forms": "~12.1.1" },

Run npm install and it worked

mvdcreativo avatar Jul 02 '21 05:07 mvdcreativo

it worked here: https://stackoverflow.com/questions/68220000/how-to-fix-ngx-custom-validator-in-angular-12/68746402#68746402

davifsroberto avatar Aug 11 '21 17:08 davifsroberto