React build issue, ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js):

Solved:

The problem was with package babel-loader, the latest version expects @babel/core. Downgraded the version to 7.x and it's fine now

"devDependencies": {
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.5",
    "babel-preset-env": "^1.7.0",
    "babel-preset-react": "^6.24.1",
    "html-webpack-plugin": "^3.2.0",
    "webpack": "^4.17.1",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.6"
  },
  "dependencies": {
    "react": "^16.4.2",
    "react-dom": "^16.4.2"
  }