You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to use Ololog in react-native. Right now it seems it primary doesn't work because the browser check is incorrect so react-native is detected as a browser and undefined properties are read.
It also seems that stacktracey is incompatible with react-native, primarily because of:
react-native does not support synchronous XMLHttpRequests
get-source assumes some node APIs exist that don't on react-native, namely process.cwd is undefined.
How feasible do you think it is to make ololog support react-native out of the box? If the browser checks are fixed it seems to be mostly working except for source mapping. When I tried to async load the source map from metro (react-native's bundler) it just hangs because the source map is enormous. I'm not really familiar with how source mapping works and editing non typescript JS written by somebody else is challenging so I'm not sure if I'm able to figure it out right now.
The text was updated successfully, but these errors were encountered:
@GollyJer I manually patched it with pnpm's patchedPackages feature. Since then I've given up on this since it's unmaintained and the code is really inscrutable. Instead now I emit all my logs as JSON and use https://github.com/brocode/fblog to pretty print the json in the terminal.
It would be nice to use Ololog in react-native. Right now it seems it primary doesn't work because the browser check is incorrect so react-native is detected as a browser and undefined properties are read.
should be
in ololog and all of it's dependencies, otherwise react-native gets detected as a browser environment and crashes accessing undefined APIs.
You can also test for react-native directly with
It also seems that
stacktracey
is incompatible with react-native, primarily because of:get-source
assumes some node APIs exist that don't on react-native, namelyprocess.cwd
is undefined.How feasible do you think it is to make ololog support react-native out of the box? If the browser checks are fixed it seems to be mostly working except for source mapping. When I tried to async load the source map from metro (react-native's bundler) it just hangs because the source map is enormous. I'm not really familiar with how source mapping works and editing non typescript JS written by somebody else is challenging so I'm not sure if I'm able to figure it out right now.
The text was updated successfully, but these errors were encountered: