Hello Guys, How are you all? Hope You all Are Fine. Today I am facing following error: TypeError: global.performance.now is not a function in ReactJs. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How TypeError: global.performance.now is not a function Error Occurs ?
I am facing following error.
TypeError: global.performance.now is not a function
How To Solve TypeError: global.performance.now is not a function Error ?
How To Solve TypeError: global.performance.now is not a function Error ?
To Solve TypeError: global.performance.now is not a function ErrorFirst Of All You Need To open Your Your_project/node_modules/react-native-reanimated/src/reanimated2/core.ts and Then Go to Line number 386 You can find below line: global.performance = { now: global._chronoNow, } Change Above code with This Code: if(global.performance == null) { global.performance = { now: global._chronoNow, }; } Now, Your error must be solved.
TypeError: global.performance.now is not a function
To Solve TypeError: global.performance.now is not a function ErrorFirst Of All You Need To open Your Your_project/node_modules/react-native-reanimated/src/reanimated2/core.ts and Then Go to Line number 386 You can find below line: global.performance = { now: global._chronoNow, } Change Above code with This Code: if(global.performance == null) { global.performance = { now: global._chronoNow, }; } Now, Your error must be solved.
Solution 1: Change This Line
First Of All You Need To open Your Your_project/node_modules/react-native-reanimated/src/reanimated2/core.ts and Then Go to Line number 386 You can find below line.
global.performance = {
now: global._chronoNow,
}
Change Above code with This Code.
if(global.performance == null) {
global.performance = {
now: global._chronoNow,
};
}
Now, Your error must be solved.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read