-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest fails to work with Babel7 #6982
Comments
You have to use |
@milesj is correct 🙂 Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions. |
@yvele Because Jest uses |
Actually, this is the package setup that got this working for me: "devDependencies": {
"@babel/core": "^7.0.1",
"@babel/preset-env": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0"
} |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
A clear and concise description of what the bug is.
I have a simple project where I'm using Babel 7.0.0 instead of 6. Jest fails to work with it, saying that it can't find the "env" preset, even thought it is installed and indicated in the package-based config.
To Reproduce
Steps to reproduce the behavior:
My package.json:
Expected behavior
Expect the test to run. When I down grade to Babel 6.x it works as expected. When I try to use Babel 7, it fails.
A clear and concise description of what you expected to happen.
When I run
npm t
I get the following error:Link to repl or repo (highly encouraged)
https://github.com/rbiggs/jest-test
Please provide either a repl.it demo or a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run
npx envinfo --preset jest
Paste the results here:
System: OS: macOS 10.14 CPU: x64 Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz Binaries: Node: 8.11.2 - /usr/local/bin/node npm: 5.6.0 - /usr/local/bin/npm npmPackages: jest: ^23.6.0 => 23.6.0
Output from VSCode:
The text was updated successfully, but these errors were encountered: