Expo attached vs detached: different js runtime?



It seems after detaching, when running on my android device, the “console.time” function is not defined anymore while it worked fine inside Expo client on same device.

Can someone explain me the differences between the attached and detached JS runtimes?


Which JS APIs are supported in Expo runtimes?

You could have some dev flags that are changing those functions to null.
When you run in production perhaps there is some use-strict that is surfacing the error.
A good way to test without deploying is to run with: exp start --no-dev --strict :smiley:

I think that console.time isn’t supported - I stub this out a lot in expo-three.
My solution to this is to use this library: react-native-console-time-polyfill


Thanks @bacon Ill try that :wink:


@bacon there’s no --strict option in help of exp cli v47 is it some hidden feature? how does this flag work?


The --strict option has been removed in exp v47, since this feature is not currently implemented in the bundler and therefore didn’t work as intended.