Error: Cannot find module ‘@babel/core’

when installing Babel, I encountered an Error: Cannot find module ‘@babel/core ‘. I checked a lot of materials before solving the problem. I hope I can help you brothers.
problem cause
problem cause
babel-loader and babel-core version do not correspond to generated,

babel-core x
babel-core as a way to make a new babel-core
NPM UN babel-core
NPM i-d @babel/core
NPM UN Babel – making of

NPM UN Babel -0
4, making of a new Babel
NPM I Babel/react
NPM I Babel -mobx
, uninstalling the old Babel -plugin
NPM UN babel-plugin-transform-runtime
6, install the new babel-plugin
NPM install –save-dev @babel/ plug-object-rest-spread
NPM install –save-dev @babel/ plug-object-rest-spread
NPM install –save-dev @babel/ plug-transform-runtime
NPM Install –save @babel/runtime
7, modify. Babelrc file

{
“presets” : [” @ Babel/preset – env “, “@ Babel/preset – react”, “mobx”],
“plugins” :
“@babel/ plugin-statement-object-rest-spread “,
“@babel/plugin-transform-runtime”
]
}
if you have finished the installation according to the above command, the corresponding version should be as shown below, and the problem should be solved.
“devDependencies” : {
“@ Babel/core” : “^” 7.2.2,
“@ Babel/plugin – proposal – object – the rest – spread” : “^ 7.2.0”,
“@ Babel/plugin – transform – runtime” : “^ 7.2.0,”
“@ Babel/preset – env” : “^ 7.2.3”,
“@ Babel/preset – react” : “^” 7.0.0,
“Babel – loader” : “^ 8.0.4”,
“Babel – preset – mobx” : “^ 2.0.0”,
“CSS – loader” : “^ 2.1.0,”
“file – loader” : “^” 3.0.1,
“popper. Js” : “^ 1.14.6”,
“style – loader” : “^ 0.23.1”,
“url – loader” : “^ 1.1.2”,
“webpack” : “^ 4.28.2”,
“webpack – cli” : “^ 3.1.2”
},
“dependencies” : {
“@ Babel/runtime” : “^ 7.2.0”,
“bootstrap” : “^ 2”,
“jquery” : “^ 3.3.1”
}

Read More: