tslog
tslog copied to clipboard
Bug: errors out when using react native with metro server
Describe the bug errors out anytime it being run in react native app/ also had to manually install os and path.
To Reproduce Steps to reproduce the behavior:
- install tslog
- import Logger to a file like in the example given
- run React-native run android
- See error:
- WARN Require cycle: node_modules\os\index.js -> node_modules\os\index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. ERROR TypeError: _$$_REQUIRE(dependencyMap[1], "os").hostname is not a function. (In '$$_REQUIRE(dependencyMap[1], "os").hostname()', '$$_REQUIRE(_dependencyMap[1], "os").hostname' is undefined) ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context running it within a react native app using a metro server
Node.js Version 16.x.x
OS incl. Version Windows 11