Cannot read property 'nativeNode' of undefined
See original GitHub issueWe’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
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
Angular testing: Cannot read property 'nativeElement' of null
This is because when this test will run, your users array will be empty, and hence there will be no element in html...
Read more >Cannot read property nativeNode
Hi I have a strange error here, it is not easy to describe. The real problem is that I cannot build a demo...
Read more >Re: TypeError: Cannot read properties of null (rea...
Hello, I'm working with the ArcGIS API for Javascript, @arcgis/core ^4.22 inside an angular (13.1.1) application and encountering an error ...
Read more >Cannot read properties of undefined (reading 'title') 2
Dear Mr. Jason & everyone I am getting this error the add new-product page is not working I appreciate any help, I am...
Read more >Cannot read property 'nativeNode' of undefined
Cannot read property 'nativeNode' of undefined ... We're getting up and running with angular-hmr in our existing ng2 project but are experiencing ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
@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.