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

got error after update to ng 10.0.1 #39

Closed
Mangdar opened this issue Jun 28, 2020 · 12 comments
Closed

got error after update to ng 10.0.1 #39

Mangdar opened this issue Jun 28, 2020 · 12 comments

Comments

@Mangdar
Copy link

Mangdar commented Jun 28, 2020

Types of parameters 'control' and 'control' are incompatible.
Type 'import("D:/Workspace/Frontend/playable/node_modules/@angular/forms/forms").AbstractControl' is not assignable to type 'import("D:/Workspace/Frontend/playable/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").AbstractControl'.
Types of property 'validator' are incompatible.
Type 'import("D:/Workspace/Frontend/playable/node_modules/@angular/forms/forms").ValidatorFn' is not assignable to type 'import("D:/Workspace/Frontend/playable/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").ValidatorFn'.
Types of parameters 'control' and 'control' are incompatible.
Type 'import("D:/Workspace/Frontend/playable/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").AbstractControl' is not assignable to type 'import("D:/Workspace/Frontend/playable/node_modules/@angular/forms/forms").AbstractControl'.
Types have separate declarations of a private property '_parent'.

60         CustomValidators.rangeLength([10, 10]),
@felixng1028
Copy link

felixng1028 commented Jun 29, 2020

Angular 10.0.1

Error occurred when applying [min] or [max] to input field.

<input name="validity"
		[(ngModel)]="insurancePlan.validity"
		#validity="ngModel"
		type="text"
		class="form-control"
		[class.is-invalid]="validity.touched && validity.errors"
		[placeholder]="'INSURANCE_PLAN.VALIDITY' | translate"
		[min]="1"
		[max]="99999"
		[pattern]="appConstant.positiveNumRegex">

Stacktrace:
core.js:4073 ERROR TypeError: Cannot read property 'firstCreatePass' of null
at providersResolver (core.js:27050)
at Object.definition.providersResolver (core.js:27382)
at resolveDirectives (core.js:7918)
at elementStartFirstCreatePass (core.js:13866)
at Module.ɵɵelementStart (core.js:13904)
at InsurancePlanPricingTableComponent_mat_tab_group_10_mat_cell_11_Template (insurance-plan-pricing-table.component.html:86)
at executeTemplate (core.js:7364)
at renderView (core.js:7173)
at TemplateRef.createEmbeddedView (core.js:10092)
at ViewContainerRef.createEmbeddedView (core.js:10161)

@psenechal
Copy link

Same here...here is the stack trace I get in VS Code if it helps:

Type 'import("C:/app-dev/cures/git/cures-ui/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").ValidatorFn' is not assignable to type 'import("C:/app-dev/cures/git/cures-ui/node_modules/@angular/forms/forms").ValidatorFn'. Types of parameters 'control' and 'control' are incompatible. Type 'import("C:/app-dev/cures/git/cures-ui/node_modules/@angular/forms/forms").AbstractControl' is not assignable to type 'import("C:/app-dev/cures/git/cures-ui/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").AbstractControl'. Types of property 'validator' are incompatible. Type 'import("C:/app-dev/cures/git/cures-ui/node_modules/@angular/forms/forms").ValidatorFn' is not assignable to type 'import("C:/app-dev/cures/git/cures-ui/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").ValidatorFn'. Types of parameters 'control' and 'control' are incompatible. Type 'import("C:/app-dev/cures/git/cures-ui/node_modules/ngx-custom-validators/node_modules/@angular/forms/forms").AbstractControl' is not assignable to type 'import("C:/app-dev/cures/git/cures-ui/node_modules/@angular/forms/forms").AbstractControl'. Types have separate declarations of a private property '_parent'.

@deepakgonda
Copy link

deepakgonda commented Jul 1, 2020

Same also in my case. If you use version 8.0.0 then it will compile successfully without any error.

@bt-serdarbuyuktemiz
Copy link

I am getting similar error for range directive

vendor.js:18233 ERROR TypeError: Cannot read property 'firstCreatePass' of null
at providersResolver (vendor.js:311619)
at Object.definition.providersResolver (vendor.js:311951)
at resolveDirectives (vendor.js:22021)
at elementStartFirstCreatePass (vendor.js:27969)
at ɵɵelementStart (vendor.js:28007)
at Module.ɵɵelement (vendor.js:28082)
at xComponent_kendo_dialog_2_ng_template_10_ng_template_38_Template (main.js:12593)
at executeTemplate (vendor.js:21481)
at renderView (vendor.js:21290)
at TemplateRef.createEmbeddedView (vendor.js:24195)

Also in visual studio code, I see this warning...

Can't bind to 'range' since it isn't a known property of 'x'.

  1. If 'x' is an Angular component and it has 'range' input, then verify that it is part of this module.
  2. If 'x' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.ng

@suhailkc
Copy link

suhailkc commented Jul 6, 2020

I have the same error after update to angular 10

core.js:4073 ERROR TypeError: Cannot read property 'firstCreatePass' of null
    at providersResolver (core.js:27050)
    at Object.definition.providersResolver (core.js:27382)
    at resolveDirectives (core.js:7918)
    at elementStartFirstCreatePass (core.js:13866)
    at ɵɵelementStart (core.js:13904)
    at ɵɵelement (core.js:13979)
    at FormValidationComponent_Template (template.html:83)
    at executeTemplate (core.js:7364)
    at renderView (core.js:7173)
    at renderComponent (core.js:8431)
 <input class="form-control" type="text" placeholder="digits" ngModel name="digits" #digits="ngModel" digits/>

Is there any solution to that???

@felixng1028
Copy link

downgrade ngx-custom-validators to version 8.0.0 is worked fine for me

@suhailkc
Copy link

suhailkc commented Jul 6, 2020

@felixng1028 Thanks, it's working.
I hope this package would be updated soon.

@maciaszczykm
Copy link

We are experiencing the same problem after updating Angular to v10 (kubermatic/dashboard#2456).

@IvanovAlmeida
Copy link

downgrade ngx-custom-validators to version 8.0.0 is worked fine for me

Thanks, it worked perfectly

@rsaenen
Copy link
Owner

rsaenen commented Oct 14, 2020

Released with 10.0.0, please reopen the issue if necessary.

@rsaenen rsaenen closed this as completed Oct 14, 2020
@smnbbrv
Copy link

smnbbrv commented Nov 13, 2020

@rsaenen

Same error after upgrading to angular 11. Using ngx-validators@10.

Test snippet:

<input type="number" matInput required step="1" [min]="0" [max]="var1" [(ngModel)]="var2" name="name" #model="ngModel">

@Akbari300
Copy link

thank you it solved

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