react-app-rewired directly uses babel-jest here: https://github.com/timarney/react-app-rewired/blob/master/scripts/utils/babelTransform.js#L1
but babel-jest is not included in dependencies or peerDependencies, which opens the possibility for react-app-rewired to reference an incompatible version of babel-jest (specifically ran into this issue when using pnpm package manager).
Recently, the babel-jest API around createTransformer has been broken (https://github.com/facebook/jest/issues/11444). As a result, installations of babel-jest 27.x break react-app-rewired.
Simply pinning babel-jest to <27 should resolve this issue.
react-app-rewired directly uses babel-jest here: https://github.com/timarney/react-app-rewired/blob/master/scripts/utils/babelTransform.js#L1 but babel-jest is not included in
dependencies
orpeerDependencies
, which opens the possibility for react-app-rewired to reference an incompatible version of babel-jest (specifically ran into this issue when using pnpm package manager).Recently, the babel-jest API around createTransformer has been broken (https://github.com/facebook/jest/issues/11444). As a result, installations of babel-jest 27.x break react-app-rewired.
Simply pinning babel-jest to <27 should resolve this issue.