Requires Babel "7.0.0-0" but was loaded with "6.26.3"
Looks like you need to install babel-core
as the docs suggest:
https://jestjs.io/docs/en/getting-started#using-babel
yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime
Test which version you are running with cmd
babel -V
If it is not verion 7 or higher
npm uninstall babel-cli -g
npm uninstall babel-core -g
And
npm install @babel/cli -g
npm install @babel/core -g
If you are using Jest run
npm install [email protected] --save-dev
Uninstall and reinstall @babel/node solves the problem if you do node development.
For the ones who still fighting that, 4 days ago Jest v24 released with native support for babel 7. enjoy.
Sometimes its because you have installed both babel-cli and babel/cli, or babel-core and @babel/core It causes conflicts
So
1) delete node_modules
2) remove babel-cli, babel-core from your package.json, keep @babel/core, @babel/cli
3) npm install
babel-cli conflicts with @babel/cli
bable-core conflicts with @babel/core