inspect
inspect copied to clipboard
React Native compatibility
At the moment running inspector in react-native application throws an Error.
ERROR TypeError: this.options.window.open is not a function (it is undefined), js engine: hermes
I don't believe it'll be exactly possible to handle opening the browser whilst its running within RN
Could checking for access of window, prior to just opening, and then logging out the url to console be an option to give access as a workaround when working outside of browser
- A module failed to load due to an error and
AppRegistry.registerComponentwasn't called., js engine: hermesI don't believe it'll be exactly possible to handle opening the browser whilst its running within RN Could checking for access of `window`, prior to just opening, and then logging out the url to console be an option to give access as a workaround when working outside of browser
This error commonly occurs when the entry file (index.js or App.js) is not properly specified or the main component is not registered using AppRegistry.registerComponent. To resolve this issue:
-
Check your entry file (usually
index.jsorApp.js) to ensure that there is a line similar toAppRegistry.registerComponent('Main', () => App)included. Here,'Main'represents the name of the main component in your React Native application. Adjust this line to match your app's main component if it differs. -
Ensure that this registration line is correctly written and properly executed in your entry file. It should define the main component of your application and register it for the React Native framework to recognize it as the starting point of your app.
By confirming the correct registration of your main component within the entry file using AppRegistry.registerComponent, you can resolve the "Invariant Violation: 'main' has not been registered" error in your React Native application.
I've edited the error report to remove those metro violations, those lines were superfluous, that violation occurs due to the preceding error. The app is definitely registered correctly and only errors once adding in the inspector to a machine
Hi, is there any progress on that?
Hi, is there any progress on that?
We're working on a websocket inspector adapter in this package that should be used instead.
Def a bit hacky, but here's a working fork that works w/RN: https://github.com/tnortman-jabra/stately-inspect/pull/1/files