Whenever I run webpack in the terminal I get:
Hash: efea76b1048c3a97b963 Version: webpack 1.12.13 Time: 33ms     + 1 hidden modules  ERROR in Cannot find module 'babel-core'   Here is my webpack.config.js file
module.exports = {   entry: './app-client.js',   output: {     filename: 'public/bundle.js'   },   module: {     loaders: [       {         exclude: /(node_modules|app-server.js)/,         loader: 'babel'       }     ]   } }   package.json
{   "name": "react",   "version": "1.0.0",   "description": "React polling app",   "main": "app-client.js",   "dependencies": {     "babel-loader": "^6.2.2",     "bootstrap": "^3.3.6",     "express": "^4.13.4",     "react": "^0.14.7"   },   "devDependencies": {},   "scripts": {     "test": "echo \"Error: no test specified\" && exit 1"   },   "author": "",   "license": "ISC" } 
                To solve the error "Cannot find module '@babel/core'", make sure to install the @babe/core package by opening your terminal in your project's root directory and running the following command: npm i -D @babel/core and restart your IDE and development server.
Babel is a JavaScript compiler Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments.
You should install babel-loader and babel-core as dev-dependency while npm install.
npm install babel-core babel-loader --save-dev 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With