Angular/MDB project totally broken


Topic: Angular/MDB project totally broken

Nicolas Hug asked 4 years ago

Hi,

Since today I can't launch my Firebase Angular project as I got this error :

ERROR TypeError: this.el.nativeElement.firstElementChild.firstElementChild is null
ngAfterContentChecked ng-uikit-pro-standard.js:8046
Angular 27
    callHook
    callHooks
    executeInitAndCheckHooks
    refreshView
    refreshComponent
    refreshChildComponents
    refreshView
    renderComponentOrTemplate
    tickRootContext
    detectChangesInRootView
    detectChanges
    tick
    _loadComponent
    bootstrap
    _moduleDoBootstrap
    _moduleDoBootstrap
    bootstrapModuleFactory
    invoke
    onInvoke
    invoke
    run
    scheduleResolveOrReject
    invokeTask
    onInvokeTask
    invokeTask
    runTask
    drainMicroTaskQueue
core.js:6185:19
Angular 22
    defaultErrorLogger
    handleError
    tick
    invoke
    run
    runOutsideAngular
    tick
    _loadComponent
    bootstrap
    _moduleDoBootstrap
    _moduleDoBootstrap
    bootstrapModuleFactory
    invoke
    onInvoke
    invoke
    run
    scheduleResolveOrReject
    invokeTask
    onInvokeTask
    invokeTask
    runTask
    drainMicroTaskQueue

What I did is rm -rf node_modules and npm install. Nothing special here. Yesterday all was working fine and I was able to view my project on local browser (via firebase serve).


Nicolas Hug commented 4 years ago

All MDB related things seems to be broken, example with the menu :

https://nimb.ws/z24VPM


Nicolas Hug commented 4 years ago

But when I switch to another page (while signed in the app) errors disappear and all seems fine.

It looks like when not signed in my app, all is broken, but when I sign in all work fine. I'm using Angular and Firebase to manage users sessions and guards, but I didn't change anything since yesterday. I don't understand what is happening here. Oo


Nicolas Hug answered 4 years ago

Hi,

I think we can close this issue. The problem was a ngIf modified by one of my developpers and which hasn't been seen when code review...

But the error is very strange anyway. I still can't understand why it was buggy like that.

Regards,


Arkadiusz Idzikowski staff commented 4 years ago

@Nicolas Hug
Glad it works. It is indeed strange, but the error message is not helpful in this case. Do you know which component was causing the problem?


Nicolas Hug commented 4 years ago

Ay,

It seems that one of my developpers broke a block inside a ngIf block on an HTML page... That's all I know.

Regards,


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 10.1.1
  • Device: Desktop
  • Browser: Firefox / Chrome
  • OS: Ubuntu
  • Provided sample code: No
  • Provided link: No
Tags