javascript - Can't get rid of Uncaught Error: _registerComponent(...): Target container is not a DOM element -


this not new issue, have been reported other users too, problem have tried many solutions not able rid of error, , strangely doesn't cause problem in running app, works fine, why throws error, must doing damage app not able figure out.

following things have tried, nothing works

  1. putting <script src="/bundle.js"></script> in end of </body> tag, after </body> tag inside </html> tag.

  2. added type="text/javascript" 1 solution.

  3. added async in <script> tag.

moreover have upgraded webpack version 1 latest one, , landed error, come conclusion webpack had bug or, something?

following error stack receiving..

uncaught error: _registercomponent(...): target container not dom

element. @ invariant (12:44) @ object._rendernewrootcomponent

(369:310) @ object._rendersubtreeintocontainer (369:401) at

object.render (369:422) @ eval (729:78) @ object.

(bundle.js?61622f7508eae70357c3:4906) @ webpack_require

(bundle.js?61622f7508eae70357c3:20) @ object.

(bundle.js?61622f7508eae70357c3:4562) @ webpack_require

(bundle.js?61622f7508eae70357c3:20) at

bundle.js?61622f7508eae70357c3:63

the same issue have reported in webpack issue tracker here

my index.html , render function looks this

index.html

<!doctype html> <html>   <head>     <base href="<%= htmlwebpackplugin.options.basehref %>">     <meta charset="utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1"> </head>   <body>     <div id="root" class="container-fluid"></div>   </body>     <script type="text/javascript" src="/build.js"></script> </html> 

render

reactdom.render(   <provider store={store}>     <mainapp />   </provider>   , document.getelementbyid('root') ); 

thanks helping..

maybe should check mainapp component, eg, render function of it.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -