-
-
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
Requires Babel "^7.0.0-0", but was loaded with "6.26.3" #6992
Comments
rimraf node_modules
install by yarn,it works. |
You don't need resolutions, see example https://github.com/facebook/jest/tree/master/examples/babel-7 You're missing Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions. |
You are right I was missing babel-jest (although adding resolutions without babel-jest works too). I had it earlier and it wasn't working and I removed it due to one of the recommendations on SO. Weird its working now, but now I have a different compilation error about exports with jest even though it compiles properly with webpack. I'll try creating an issue on SO for that. I wanted to create this issue on SO instead of here but thought its a bug with jest because I followed the instructions on the site and it wasn't working. |
If this may help someone: in some setups you might need the bridge resolution. Notably if you have some files compiled through In our case |
I searched on the internet and tried different solutions (attempts). Nothing worked. Among others I also removed {
(...)
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@babel/preset-typescript": "^7.1.0",
"@types/jest": "^23.3.12",
"babel-core": "^7.0.0-bridge.0",
"jest": "^23.6.0",
"regenerator-runtime": "^0.13.1",
"tslint": "^5.12.0",
"typescript": "^3.2.2"
},
"dependencies": {}
} |
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. |
#6662
🐛 Bug Report
Followed the instructions on the jest website to install babel-core to work with Babel7, and also looked at #6662 but nothing seems to help.
The following is the Stacktrace
My package.json looks like this
My .babelrc
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: