The latest version of jest 23.6.0 does not work with node v10.13.0 and npm 6.20 or pnpm 2.18.2. The combination does work with yarn 1.12.3.
It throws the following error
Requires Babel "^7.0.0-0", but was loaded with "6.26.3".
This happens both in Ubuntu 18.04 and Windows 10.
Related to issues #6662 and #6913. I first tried all suggestions in these issue before switching to yarn in despair.
Steps to reproduce the behaviour:
- Install node version v10.13.0
- Install npm version 6.20 or pnpm 2.18.2
- Install yarn version 1.12.3
- Install example repo
- npm i
- jest
- rm -rf node_modules && rm package-lock.json
Repeat steps 5-7 for pnpm and yarn.
Jest should work with npm, pnpm and yarn.
Minimal repo on GitHub to demonstrate the issue.
Paste the results here:
System:
OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i7-6650U CPU @ 2.20GHz
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.12.3 - ~/.nvm/versions/node/v10.13.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
npmPackages:
jest: ^23.6.0 => 23.6.0