question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nz-modal Cannot read property 'nativeNode' of null

See original GitHub issue

Steps to reproduce

"dependencies": {
        "@angular/animations": "^9.1.9",
        "@angular/cdk": "^9.2.4",
        "@angular/common": "^9.1.9",
        "@angular/compiler": "^9.1.9",
        "@angular/core": "^9.1.9",
        "@angular/elements": "^9.1.9",
        "@angular/forms": "^9.1.9",
        "@angular/localize": "^9.1.9",
        "@angular/platform-browser": "^9.1.9",
        "@angular/platform-browser-dynamic": "^9.1.9",
        "@angular/router": "^9.1.9",
        "@webcomponents/custom-elements": "^1.4.1",
        "aes-js": "^3.1.2",
        "angular-highcharts": "^9.0.11",
        "angulartics2": "^9.0.1",
        "core-js": "^3.6.5",
        "crypto-js": "^4.0.0",
        "hammerjs": "^2.0.8",
        "highcharts": "^8.1.0",
        "immer": "^6.0.5",
        "jquery": "^3.2.1",
        "lodash": "^4.17.15",
        "lodash-es": "^4.17.10",
        "lru_map": "^0.3.3",
        "measure-font": "^1.0.0",
        "moment": "^2.24.0",
        "net": "^1.0.2",
        "ng-zorro-antd": "^9.1.2",
        "raven-js": "^3.27.2",
        "rxjs": "^6.5.3",
        "toastr": "^2.1.4",
        "tslib": "^1.10.0",
        "zone.js": "~0.10.2"
    },

打开弹框,关闭弹框后控制台报错,升级了多个项目,就一个项目有这个问题,稳定复现,任何一个弹框都会有这样的问题

What is expected?

弹框关闭

What is actually happening?

弹框关闭,报错 TypeError: Cannot read property ‘nativeNode’ of null at removeDebugNodeFromIndex (core.js:30099) at DebugRenderer2.push…/node_modules/@angular/core/fesm5/core.js.DebugRenderer2.destroyNode (core.js:32384) at destroyViewNodes (core.js:31600) at destroyView (core.js:31588) at callViewAction (core.js:31706) at execEmbeddedViewsAction (core.js:31649) at destroyView (core.js:31578) at callWithDebugContext (core.js:32324) at Object.debugDestroyView [as destroyView] (core.js:32026) at ViewContainerRef_.push…/node_modules/@angular/core/fesm5/core.js.ViewContainerRef_.clear (core.js:22245) at NgIf.push…/node_modules/@angular/common/fesm5/common.js.NgIf._updateView (common.js:3522) at NgIf.set [as ngIf] (common.js:3478) at updateProp (core.js:22883) at checkAndUpdateDirectiveInline (core.js:22638) at checkAndUpdateNodeInline (core.js:31501) at checkAndUpdateNode (core.js:31463) at debugCheckAndUpdateNode (core.js:32100) at debugCheckDirectivesFn (core.js:32060)

Environment Info
ng-zorro-antd 9.1.2
Browser chrome 81.0.4044.138

build 和功能都不受影响,只是控制台报错

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mdragosshcommented, May 23, 2020

This problem is not related to nz-modal , maybe your register twice nzModalModule

0reactions
hsuanxyzcommented, May 25, 2020

I will reopen so that others with the same problem can find it until it fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'showModel' of null) - Stack Overflow
Another problem which exist in your code is that you've passed showModel in Main.js as props for the Modal component.
Read more >
Hi,. Thanks a lot for this article, it is… | by Murali | Medium
... I'm getting 'Uncaught TypeError: Cannot read property 'nativeNode' of null' error. Another I noticed is when we reopen the modal dialog, ...
Read more >
Cannot read property 'GlideModal' of null
The correct way to re-write this script to run in strict mode would be: var dialogClass = (typeof GlideModal !== 'undefined') ? GlideModal...
Read more >
TypeError: Cannot read property 'append' of null - Ionic React
I'm trying to use the IonModal component and getting an error with react-query that I don't know how to solve.
Read more >
Re: TypeError: Cannot read properties of null (rea...
TypeError : Cannot read properties of null (reading 'append'), angular 13 & @arcgis/core 4.22. 9669. 2. 01-17-2022 07:01 AM. gryffs. by gryffs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found