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

Cannot read property 'firstCreatePass' of null #47

Open
dtslvr opened this issue Nov 9, 2020 · 10 comments
Open

Cannot read property 'firstCreatePass' of null #47

dtslvr opened this issue Nov 9, 2020 · 10 comments

Comments

@dtslvr
Copy link

dtslvr commented Nov 9, 2020

We still have an issue after upgrading ngx-custom-validators from 8.0.0 to 10.0.0 using Angular 10.

HTML

<input
  json
  [(ngModel)]="settings.elements">
</input>

Error in console

zone-evergreen.js:171 Uncaught TypeError: Cannot read property 'firstCreatePass' of null
    at providersResolver (core.js:18748)
    at Object.definition.providersResolver (core.js:19000)
    at resolveDirectives (core.js:7986)
    at elementStartFirstCreatePass (core.js:13939)
    at Module.ɵɵelementStart (core.js:13977)
    at SettingsComponent_ng_container_0_Template (settings.html:70)
    at executeTemplate (core.js:7447)
    at renderView (core.js:7256)
    at TemplateRef.createEmbeddedView (core.js:10162)
    at ViewContainerRef.createEmbeddedView (core.js:10231)

Environment information

  • OS: macOS Catalina
  • Angular Version: 10.0.6
  • Typescript version: 3.9.7
  • npm version: 6.14.8
  • Node Version: 14.15.0
@sannyjacobsson
Copy link

sannyjacobsson commented Nov 11, 2020

<input type="text" required [rangeLength]="[0, 6]" class="form-control" [(ngModel)]="..." (ngModelChange)="..." #unitNameModel="ngModel" id="..." name="..." autocomplete="off">

core.js:4442 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'firstCreatePass' of null
TypeError: Cannot read property 'firstCreatePass' of null
    at providersResolver (core.js:18748)
    at Object.definition.providersResolver (core.js:19000)
    at resolveDirectives (core.js:8004)
    at elementStartFirstCreatePass (core.js:14749)
    at Module.ɵɵelementStart (core.js:14787)
    at ......_Template (…s.component.html:19)
    at executeTemplate (core.js:7457)
    at renderView (core.js:7264)
    at renderComponent (core.js:8520)
    at renderChildComponents (core.js:7138)
    at resolvePromise (zone-evergreen.js:798)
    at resolvePromise (zone-evergreen.js:750)
    at zone-evergreen.js:860
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:27492)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at drainMicroTaskQueue (zone-evergreen.js:569)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
    at invokeTask (zone-evergreen.js:1621)

Windows 10
Angular: 10.2.3
Typescript: 4.0.5
Node: 14.15.0
Angular/cli: 10.2.0

@coder925
Copy link

Same issue in Angular 11.0.1. Downgrading ngx-custom-validators to 8.0.0 still works as a workaround.

@dtslvr
Copy link
Author

dtslvr commented Jan 20, 2021

Using ngx-custom-validators:11.0.1 together with Angular 11 (11.0.9) seems to work. Can someone confirm?

@matiasah
Copy link

I don't seem to be getting this error anymore.

@sebastian-zarzycki-apzumi
Copy link

sebastian-zarzycki-apzumi commented Feb 5, 2021

It worked (on ver 11.0.1) briefly for Angular 11.0.9, but now with Angular 11.1.x, it's broken again (with the error from this issue). Additionally during npm install in an Angular 11.1.2 project that uses ngx-custom-validators, it produces

  • (minor) [email protected] requires a peer of @angular/core@~11.0.0
  • (not sure what the ramifications are) @angular/[email protected] requires a peer of zone.js@~0.10.3 but none is installed, as it relies on that version of angular and has zone.js@~0.10.3 in peerDependencies, while newer Angular sits already on zone.js@~0.11.3

@rodrigueaf
Copy link

Not work with Angular: 11.2.0 and ngx-custom-validators:11.0.1 . I have to downgrade ngx-custom-validators to 8.0.0

@dtslvr
Copy link
Author

dtslvr commented May 26, 2021

It worked (on ver 11.0.1) briefly for Angular 11.0.9, but now with Angular 11.1.x, it's broken again (with the error from this issue)

Also broken in Angular 12.0.1.

@sebastian-zarzycki-apzumi

Of course it is.

@tamirazrab
Copy link

I seem to get this error only if I bind min or minDate property to input, removing binding works. Not sure what's the problem.

@scaljeri
Copy link

Hi, although I'm not using ngx-custom-validators, I managed to get a similar error. I fixed the error just by adding the following tp tsconfig.json:

"paths": {
  "@angular/*": ["./node_modules/@angular/*"]
 },

to the compilerOptions section

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

8 participants