Fix the Cannot find module ‘@babel/core’ error
In this post we will give you information about Fix the Cannot find module ‘@babel/core’ error. Hear we will give you detail about Fix the Cannot find module ‘@babel/core’ errorAnd how to use it also give you demo for it if it is necessary.
we are going to learn about how to fix the Cannot find module ‘@babel/core’ error.
When we run a project using npm start, sometimes we see the following error in our terminal.
ERROR in ./src/index.jsModule build failed (from ./node_modules/babel-loader/lib/index.js):Error: Cannot find module '@babel/core'
It occurs due to the package name is changed from babel-core to @babel/core
To fix the error, we can install the @babel/core module by running the following command.
npm i -D @babel/core
If your still facing the issue even after installing the @babel/core module follow the below steps to fix it.
- First, remove the node_modules folder, package-lock.json file present inside your project directory by using the below command.
rm-rf node_modulesrm-rf package-lock.json
or you can remove it manually by right-clicking on it and select the delete option.
- Clear the npm cache.
npm clean cache --force
- Re-install the node modules again by running the npm install command.
Hope this code and post will helped you for implement Fix the Cannot find module ‘@babel/core’ error. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs