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 gives missing "InitializeCore" error. #29516

Closed
joshuapinter opened this issue Jul 28, 2020 · 2 comments
Closed
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@joshuapinter
Copy link
Contributor

joshuapinter commented Jul 28, 2020

Description

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.

React Native version:

info 
  React Native Environment Info:
    System:
      OS: macOS 10.15.5
      CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
      Memory: 84.27 MB / 16.00 GB
      Shell: 5.7.1 - /bin/zsh
    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
      Watchman: 4.7.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
      Android SDK:
        API Levels: 15, 17, 22, 23, 25, 26, 27, 28, 29
        Build Tools: 26.0.0, 27.0.3, 28.0.0, 28.0.0, 28.0.0, 28.0.2, 28.0.3, 29.0.2, 29.0.3
        System Images: android-15 | Google APIs Intel x86 Atom, android-17 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 4.0 AI-193.6911.18.40.6626763
      Xcode: 11.6/11E708 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.10 => 0.59.10 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-macos-cli: 2.0.1
      react-native-unified-contacts: 2.0.0-pre.2

Steps To Reproduce

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

  2. Run jest tests.

Expected Results

Tests run normally as they did prior to the upgrade.

Snack, code example, screenshot, or link to a repository:

n/a

@joshuapinter
Copy link
Contributor Author

As per @SimenB from this Issue, it appears Jest 26 supports React Native 0.61+.

I'll leave this open for some confirmation but it would also be nice to be able to find this version compatibility somewhere so others don't have to dig around for comments and end up wasting your guys' time with Issues, etc. :)

@stale
Copy link

stale bot commented Dec 26, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 26, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Dec 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

1 participant