Current Behavior
Recently I'm trying to setup babel with webpack. and I'm getting an error.
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@babel/core'
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@babel/core'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! webpack-4-tutorial@1.0.0 build: `webpack --mode production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the webpack-4-tutorial@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mentos\AppData\Roaming\npm-cache\_logs\2018-09-01T10_50_57_222Z-debug.log
Edits by @JLHwung
If you hit this issue via search engines, please refer to https://github.com/babel/babel/issues/8599#issuecomment-417880788.
Bug Report
Current Behavior Recently I'm trying to setup babel with webpack. and I'm getting an error.
package.json
package.json
Expected behavior/code Babel Configuration (.babelrc, package.json, cli command)
debug.log
Environment
Possible Solution
Additional context/Screenshots I follow the same step in past and it was work fine.
Originally posted by @palak-temp in https://github.com/babel/babel/issues/8599