Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: global.performance.now is not a function in react native

error


Unable to find any solution to this query.

TypeError: global.performance.now is not a function
at node_modules/expo/build/logs/LogSerialization.js:156:14 in _captureConsoleStackTrace
at node_modules/expo/build/logs/LogSerialization.js:41:26 in serializeLogDataAsync
- ... 9 more stack frames from framework internals


like image 341
Fashad Ahmed Avatar asked May 06 '26 22:05

Fashad Ahmed


1 Answers

make change to this file: node_modules/react-native-reanimated/src/reanimated2/core.ts Line 386, remove this:

global.performance = {
 now: global._chronoNow,

};

then add this:

if(global.performance == null) {
    global.performance = {
      now: global._chronoNow,
    };
  }
like image 55
devbiswasnegi Avatar answered May 09 '26 14:05

devbiswasnegi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!