mzgoddard / jest-webpack

Use jest with webpack.
https://www.npmjs.com/package/jest-webpack
92 stars 21 forks source link

does not work with jest >=24.2.0 #36

Open dpinol opened 5 years ago

dpinol commented 5 years ago

I get this error

Error: Cannot find module 'jest-core/build/SearchSource'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at tryRequire (/Users/dani/hubtype/botonic/packages/botonic-plugin-contentful/node_modules/jest-webpack/src/test-entries-plugin.js:19:9)
    at module.exports.attempts (/Users/dani/hubtype/botonic/packages/botonic-plugin-contentful/node_modules/jest-webpack/src/try-require.js:5:23)
    at Object.<anonymous> (/Users/dani/hubtype/botonic/packages/botonic-plugin-contentful/node_modules/jest-webpack/src/test-entries-plugin.js:14:22)

Indeed, in test-entries-plugin.js, it tries to find searchsource in jest-cli, but after 24.2.0, it's at @jest/core/build/SearchSource. It also fails loading create_context, which is now at jest-core/src/lib/create_context.ts.

thanks