question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

babel 7 inconsistent transformation

See original GitHub issue

🐛 Bug Report

When upgrading to babel 7 some files are not being transformed. I have both babel-core@7.0.0-bridge.0 and babel-jest installed.

Example error message: screen shot 2018-09-21 at 1 23 08 pm

To Reproduce

https://github.com/chrisblossom/backtrack/tree/babel-7

git clone https://github.com/chrisblossom/backtrack.git
cd backtrack
git checkout babel-7
npm install
npm run test

jest --clearCache sometimes helps some tests pass.

Expected behavior

All tests pass.

Link to repl or repo (highly encouraged)

https://github.com/chrisblossom/backtrack/tree/babel-7 https://github.com/chrisblossom/backtrack/commit/697617c7f499c2c8e4c0dd2b7056c1d070a10fcf

Run npx envinfo --preset jest

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.11.4/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
michaloocommented, Oct 16, 2018

I think the problem is that babel-jest expects babel configuration file babel.config.js to simply return a JS object:

https://github.com/facebook/jest/blob/master/packages/babel-jest/src/index.js#L58

while babel js started to promote a config API which allows to return a function:

https://babeljs.io/docs/en/config-files#config-function-api

and this is what we have in the example repo project:

https://github.com/chrisblossom/backtrack/blob/babel-7/.babelrc.js

0reactions
github-actions[bot]commented, May 12, 2021

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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependencies incompatible with new upgrades (for example ...
Dependencies incompatible with new upgrades (for example babel 7). Hi! I'm looking for some advice regarding dependencies, because my package.json dependencies ...
Read more >
Babel Roadmap
We haven't figured out yet a policy for Babel 7 maintenance. ... A minimal Babel transforming setup requires at least three packages:.
Read more >
Incompatible Bable Version React - javascript - Stack Overflow
I Am using node version 12.18.1. I installed following to start with react testing in my application I am using React integrated within...
Read more >
babel-preset-env | Yarn - Package Manager
Setting this to false will not transform modules. debug. boolean , defaults to false . Outputs the targets/plugins used and the version specified...
Read more >
Updating to Babel 7.4 - The Basement
As we learned in the Working with babel 7 and Wepack - post, ... care of what transforms should be applied and @babel/polyfill...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found