Im trying to resolve the issue I encounter when Im trying to update jest in my package.json
jest 26.6.3 → 27.0.1
Im receiving error
TypeError: require(...).createTransformer is not a function
at Object.<anonymous> (/local/repo/elukchm/monorepo/packages/edf/jestPreprocess.js:34:40)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
The code mentioned in files:
jestPreprocess.js
const babelOptions = {
...
};
module.exports = require("babel-jest").createTransformer(babelOptions);
Inside "babel-jest"
const createTransformer = userOptions => {
var _inputOptions$plugins, _inputOptions$presets;
const inputOptions =
userOptions !== null && userOptions !== void 0 ? userOptions : {};
const options = {
...
};
Could you please take a look and tell what should I change? Thank you in advance.