-
-
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
babel-jest fails to transpile babel code if nested directory contains a package.json
file
#6573
Comments
package.json
filepackage.json
file
My workaround is this:
|
Thanks @Hypnosphi, that workaround worked in my case as well. I'll use that for now until a proper fix comes around. |
I have created a fork of There is also a pending PR to get this merged into |
just to clarify, @lehni's fix works if you have a babel config in each nested folder w/ a |
Renaming to babel.config.js fixed the problem |
can confirm - was caused by naively upgrading to latest babel beta w/o reading the changelog. issue should be closed. |
Hmm, I wasn't able to find anything in the babel changelogs that says global Babel configurations must be in the form of a Is there no way to make this work using |
See #6053 (comment) for an explanation |
For me a
{
"extends": "@openagenda/babel-config"
}
module.exports = require( '@openagenda/babel-config' ); or const babelConfig = require( '@openagenda/babel-config' );
module.exports = api => {
const config = babelConfig( api );
// other stuff here if needed
return config;
}; |
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
I'm in the process of upgrading to
@babel/core
version7.0.0-beta.51
frombabel-core
version6.x.x
. As part of this upgrade, I've run into a ton of issues with Jest failing to process tests. It took me nearly 48 hours but I've been able to isolate the issue to a tiny reproducible test case. See "To Reproduce" below for details.TLDR: When using
[email protected]
and@babel/[email protected]
, you cannot have any subdirectories in your project that have apackage.json
file. If you do --babel-jest
will fail to process files.To Reproduce
I've created a repo with the smallest repro case I could find. See steps in README: https://github.com/EvHaus/babel-jest-bug
Expected behavior
Jest should run the tests without any
babel
transpile failures.Link to repl or repo (highly encouraged)
https://github.com/EvHaus/babel-jest-bug
Run
npx envinfo --preset jest
Also reproducible on:
The text was updated successfully, but these errors were encountered: