I can\'t believe that I\'m asking an obvious question, but I still get the error in console log.
Console says that it can\'t find the module in the directory, but I\
in my case, The error message was
Module not found: Error: Can't resolve '/components/body
While everything was in the correct directory.
I found that renaming body.jsx to body.js resolve the issue!
So I added this code in webpack.config.js to resolve jsx as js
module.exports = {
//...
resolve: {
extensions: ['.js', '.jsx']
}
};
And then build error gone!