ERROR in Cannot find module 'babel-core'. using react.js, webpack, and express server
You should install babel-loader and babel-core as dev-dependency while npm install.
npm install babel-core babel-loader --save-dev
For those wanting to use babel-loader 8+: it requires Babel 7.x,, which is to be installed as the '@babel/core' package instead of 'babel-core'.In other words, run:
npm install --save-dev @babel/core
I just meet this error, and solved by installing babel-core.But the interesting is I found babel-core does exist in babel-loader's peerDependencies.
https://github.com/babel/babel-loader/blob/master/package.json
Why peerDependecies not install automatically, after a few searching work I found this in npm blog.
peerDependencies will not automatically install anymore.