React Native version:

0.64.0

Steps To Reproduce

[Repo-code]https://github.com/rsoni5519/lerna-react-native

  • Please use above link and follow the steps described in README.

Expected Results

The App should work when we are clicking on Track buttons. it should console values for respective button events. userAgent and screenSize should work for DeviceInfo and Dimensions. Module_JsTimer_Issue steps to reproduce

1

There are 1 best solutions below

0
On

Error occurred because of cyclic dependency of react-native pakcage.

Use this repository for solution [a link] (https://github.com/vishalkhoje/cyclicImportReactNative)!

  1. Here problem is install react-native-device-info package as dependency into your root project not in your custom package.
  2. In your custom package use react-native-device-info adn react-native as a peer dependancy. Ex. This is in your custom package.json file, important is version of package is same as root project package.json file.
"peerDependencies": {
    "react-native": "^0.64.1",
    "@types/react-native": "^0.64.5",
    "react-native-device-info": "^8.1.2"
  }

This will solve your problem.

![Output screenshot:] enter image description here