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

react-native: Cannot destructure property 'config' of 'options' as it is undefined #6841

Closed
benjgil opened this issue Dec 28, 2022 · 2 comments
Labels

Comments

@benjgil
Copy link
Contributor

benjgil commented Dec 28, 2022

Getting the following error when running bit test for any react-native components.
✖ service "tester" of env "teambit.react/react-native" has failed. error: Cannot destructure property 'config' of 'options' as it is undefined.

Steps to Reproduce

  1. create a new react-native workspace with the bit template (bit new react-native my-rn-workspace)
  2. create a new react-native component bit create react-native my-comp in the workspace
  3. bit compile then bit test

Expected Behavior

tests will run without initial error preventing tests from running

Specifications

  • Bit version: 0.0.888 and 0.0.945
  • Workspace type: (harmony)

Additional context

NOTE: this issue is because of this issue with running jest v27 with version 0.66.4 of react-native, see here.

@benjgil
Copy link
Contributor Author

benjgil commented Dec 28, 2022

Workaround for now (until the react-native env rn version is updated to 0.70.6 or above):
Set any jest-related packages in the workspace.jsonc file to version 27, and add the following overrides to the teambit.dependencies.dependency-resolver config in workspace.jsonc:
"overrides": { "@jest/create-cache-key-function": "^27.0.1" },

@Zhao-Hansi
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants