Tag Archives: webpack4 Cannot find module ‘@babel/core’

webpack4 Cannot find module ‘@babel/core’ [Solved]

Error:

// webpack
Cannot find module ‘@babel/core’

Solution 1:
Cause of “babel-loader”: “^8.0.0” version problem.
Use “babel-loader”: “^7.1.5” to fix the error.

package.json

{
“devDependencies”: {
“babel-core”: “^6.26.3”,
“babel-loader”: “^7.1.5”
}
}

Solution 2:

Install @babel/core dependency

https://www.npmjs.com/package/@babel/core

npm install –save-dev @babel/core

After trying the second method and reporting an error: TypeError: Cannot read property ‘bindings’ of null

So the first method is recommended