Module build failed: Error: Cannot find module ‘babel-core’

Below error could show up after installing dependencies to a project from Package.json. For babel specific dependency, we might have to install separate babel/core to resolve this issue.

./src/index.js
Module build failed: Error: Cannot find module 'babel-core'
Require stack:
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\babel-loader\lib\index.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\webpack\lib\NormalModule.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\webpack\lib\Compiler.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\webpack\lib\webpack.js
- C:\Users\jayes\Downloads\the_venue\the_venue\node_modules\react-scripts\scripts\start.js
npm install --save-dev @babel/core @babel/preset-env

Reference – https://github.com/babel/gulp-babel/issues/124#issuecomment-326853222

All Hail, Babel!

Published by Jayesh Tiwari

I code and energize, loves sharing my journey.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s