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

房东的猫 提交于 2019-12-01 03:16:47

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

Updating my loader worked:

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

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.

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