Cannot find module '@babel/core/node_modules/@babel/types' code example
Example 1: n Error: Cannot find module '@babel/core'
npm install --save-dev @babel/core @babel/preset-env
Example 2: Error: Cannot find module '@babel/core'
For those wanting to use babel-loader 8+: it requires Babel 7.x,, which is to be installed as the '@babel/core' package instead of 'babel-core'. In other words, run:
>npm install --save-dev @babel/core