Using bit.dev and react-native env, the build is giving error

486 Views Asked by At

I created two components in react-native, they are working fine in my dev environment, when I use bit compile and bit status, everything remains on track, no errors. But when i use bit build or bit tag, it starts giving me error Validation Error: Preset react-native not found.

To counter this, I have added a new env extension that is using react-native and my components are using the env extension. I have overrided the jest config and added preset there. Nothing works. Any solution to this?

I have also confirmed that components are using the env extension only. configured tester: teambit.defender/jest (Jest @ 27.5.1) I tried overriding this jest version, which I was unable to.

1

There are 1 best solutions below

1
On BEST ANSWER

I got the solution, for this we have to add react-native as dev-dependecies in workspace.jsonc file. Bit does't pick from the package.json.