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 'nativeNode' of undefined #50

Open
Maritims opened this issue Jun 7, 2017 · 10 comments
Open

Cannot read property 'nativeNode' of undefined #50

Maritims opened this issue Jun 7, 2017 · 10 comments

Comments

@Maritims
Copy link

Maritims commented Jun 7, 2017

We're getting up and running with angular-hmr in our existing ng2 project but are experiencing a rather puzzling issue. Google has nothing to tell us on this matter. The error is as follows and I hope you can aid us in understanding why this is happening.

This behaviour occurs when we alter any code file in order to trigger a hot update.

[WDS] App hot update...
dev-server.js?b7b7:45 [HMR] Checking for updates on the server...
VM23616:623 Uncaught TypeError: Cannot read property 'nativeNode' of undefined
    at removeDebugNodeFromIndex (eval at <anonymous> (http://localhost:31337/main.bundle.js:2521:1), <anonymous>:315:39)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:5087:1), <anonymous>:143:148)
    at Array.forEach (native)
    at DebugDomRenderer.destroyView (eval at <anonymous> (http://localhost:31337/main.bundle.js:5087:1), <anonymous>:143:22)
    at CompiledTemplate.proxyViewClass.AppView.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:5136:1), <anonymous>:222:27)
    at CompiledTemplate.proxyViewClass.DebugAppView.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:5136:1), <anonymous>:619:38)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:1643:1), <anonymous>:672:67)
    at Array.forEach (native)
    at ApplicationRef_.ngOnDestroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:1643:1), <anonymous>:672:29)
    at AppModuleInjector.destroyInternal (/AppModule/module.ngfactory.js:1017:28)
    at AppModuleInjector.NgModuleInjector.destroy (eval at <anonymous> (http://localhost:31337/main.bundle.js:2569:1), <anonymous>:189:14)
    at eval (eval at <anonymous> (http://localhost:31337/main.bundle.js:4681:1), <anonymous>:46:18)
    at hotApply (http://localhost:31337/commons.bundle.js:528:14)
    at hotUpdateDownloaded (http://localhost:31337/commons.bundle.js:312:13)
    at hotAddUpdateChunk (http://localhost:31337/commons.bundle.js:292:13)
    at webpackHotUpdateCallback (http://localhost:31337/commons.bundle.js:37:12)
    at http://localhost:31337/0.8db03e9f109e4726aaa2.hot-update.js:1:1
@ghost
Copy link

ghost commented Jul 12, 2017

also having this issue

@ed-khalid
Copy link

this issue is happening to me when I switch back and forth between two modules.

@maxstee
Copy link

maxstee commented Jan 16, 2018

same here
[HMR] App is up to date. vendor.js?v=lUHzoJv-0LCJm8IVcLeBLU01Ca9mipNkf7qqbacVnoM:117780 Unhandled Promise rejection: Cannot read property 'nativeNode' of null ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'nativeNode' of null

@antontemchenko
Copy link

Had same error.

In hybrid application, downgraded (footer) component was registered twice in a module.
So Angular throw this error, when tried to delete this component for second time

@geocine
Copy link

geocine commented Jun 26, 2018

@Maritims were you able to resolve this issue?

@Maritims
Copy link
Author

@Maritims were you able to resolve this issue?

Sadly no. I've stopped working with Angular since for many reasons.

@Andrii-A
Copy link

Have the same error with hybrid app.
Angular throws this error when app goes from the page that has downgraded component.

@antontemchenko were you able to fix that?

@antontemchenko
Copy link

antontemchenko commented Nov 27, 2018

Have the same error with hybrid app.
Angular throws this error when app goes from the page that has downgraded component.

@antontemchenko were you able to fix that?

image

@Andrii-A
As i wrote earlier, in my case this error showed up when downgraded component was registered twice.
So looking for duplicated registration of the component in module and removing duplication resolved the problem.

@Andrii-A
Copy link

Thank you!
I found that I had the same problem - I registered the same component as downgraded directives with different names.

@giorgia959
Copy link

Fixed problem. In my case the problem was including in template a micro-tag as custom elements into another.

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

7 participants