Skip to content
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

Upgrading jest from 25.5.4 to 26.1.0 in React Native gives missing "InitializeCore" error. #10331

Closed
joshuapinter opened this issue Jul 28, 2020 · 4 comments

Comments

@joshuapinter
Copy link

joshuapinter commented Jul 28, 2020

πŸ› Bug Report

After upgrading jest and babel-jest from 25.5.4 to 26.1.0, I then get the following error message when running my jest tests:

 FAIL  __tests__/Helpers.test.js
  ● Test suite failed to run

    Cannot find module 'InitializeCore' from 'node_modules/react-native/jest/setup.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:308:11)
      at Object.<anonymous> (node_modules/react-native/jest/setup.js:3:15)

I'm on react-native version 0.59.10.

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade jest and babel-jest from 25.5.4 to 26.0.0.

  2. Run jest tests.

Expected behavior

Tests run normally as they did prior to the upgrade.

Link to repl or repo (highly encouraged)

n/a

envinfo

npx envinfo --preset jest

  System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 14.4.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
  npmPackages:
    jest: 26.1.0 => 26.1.0 
@joshuapinter joshuapinter changed the title Upgrading jest from 25.5.4 to 26.0.0 in React Native gives missing "InitializeCore" error. Upgrading jest from 25.5.4 to 26.1.0 in React Native gives missing "InitializeCore" error. Jul 28, 2020
@SimenB
Copy link
Member

SimenB commented Jul 28, 2020

The module is required from node_modules/react-native/jest/setup.js:3:15, you should create an issue with react-native - it's not a bug in Jest.

@SimenB SimenB closed this as completed Jul 28, 2020
@joshuapinter
Copy link
Author

πŸ‘ Will do, thanks.

@SimenB
Copy link
Member

SimenB commented Jul 28, 2020

@joshuapinter I do believe this is due to #8535 (comment) btw - you'll need to update your version of RN

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants