react & web pack hot loader. “waiting for roots to load…to reload the inspector”

核能气质少年 提交于 2019-11-30 23:32:31

问题


Just updated react to 0.13.3 and now I get the following message in Chrome react developer tool: "waiting for roots to load...to reload the inspector" and a button saying "click here".


And if I click the button, same thing again.

FYI: I am using WebPack & webpack-dev-server.

Have you seen this?


回答1:


This error is generally linked to modules not loading into the project correctly, but the cause of this when the react syntax is incorrect. Generally, it's a missing semicolon after return statements (easy to miss).

I've confirmed this using reacts tutorial, writing it out myself, seeing this error, then commenting mine out and replacing it with the script including example.js




回答2:


Updating my loader worked:

module: { loaders: [ { test: /.js$/, exclude: /node_modules/, loader: "babel-loader"} ] }




回答3:


Check your imports and exports of each of your component files. I had this same error because I forgot to export a component to my index.js file.



来源:https://stackoverflow.com/questions/32359652/react-web-pack-hot-loader-waiting-for-roots-to-load-to-reload-the-inspecto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!