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

Not working when upgrading to Angular 12 #57

Open
olegkap opened this issue May 18, 2021 · 4 comments
Open

Not working when upgrading to Angular 12 #57

olegkap opened this issue May 18, 2021 · 4 comments

Comments

@olegkap
Copy link

olegkap commented May 18, 2021

IMPORTANT:
Please be specific with an example. An issue with

Upgrade any application from Angular 11 to Angular 12

Current behavior
Fails to compile with following error:

Error: node_modules/ngx-custom-validators/src/app/url/directive.d.ts:8:25 - error TS2694: Namespace '"C:/Projects/***********/ClientApp/node_modules/ngx-custom-validators/node_modules/@angular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.

Expected/desired behavior

Compile succefully

Environment information

  • OS: Windows 10
  • Angular Version: 12
  • Typescript version: 4.2.4
  • npm version: 6.14.9
  • Node Version: v14.16.0

Other information

@jsanta
Copy link

jsanta commented May 25, 2021

Made a pull request for this. Tests are passing without problems.
https://github.com/jsanta/ngx-custom-validators

@kuth-chi
Copy link

kuth-chi commented Jul 2, 2021

`Error: node_modules/ngx-custom-validators/node_modules/@angular/forms/forms.d.ts:4283:25 - error TS2694: Namespace '"Projects/node_modules/ngx-custom-validators/node_modules/@an
gular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.

4283 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<ɵNgNoValidate, "form:not([ngNoForm]):not([ngNativeValidate])", never, {}, {}, never>;
~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/ngx-custom-validators/node_modules/@angular/forms/forms.d.ts:4318:25 - error TS2694: Namespace '"Projects/node_modules/ngx-custom-validators/node_modules/@an
gular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

4318 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ɵNgSelectMultipleOption, [null, null, { optional: true; host: true; }]>;
~~~~~~~~~~~~~~~~~~~~

Error: node_modules/ngx-custom-validators/node_modules/@angular/forms/forms.d.ts:4319:25 - error TS2694: Namespace '"Projects/node_modules/ngx-custom-validators/node_modules/@an
gular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.

4319 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<ɵNgSelectMultipleOption, "option", never, { "ngValue": "ngValue"; "value": "value"; }, {}, never>;
`

I am also facing this problem.
How to fix it please?

@abadakhshan
Copy link

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

@davifsroberto
Copy link

davifsroberto commented Aug 11, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants