react native reanimated error r.g.__reanimatedWorkletInit is not a function.
My apps is correctly working on my laptop. I am using VScode editor in my laptop where my expo version is 5.4.12 . there my apps is running well and run it successfully on my device. but the all the same codes I copied to expo snack. but shows me the error r.g.__reanimatedWorkletInit is not a function
I can’t find any solution for it.
error details below
r.g.__reanimatedWorkletInit is not a function
TypeError: r.g.__reanimatedWorkletInit is not a function
at t.Z (@react-navigation/drawer.js:3:90814)
at co ([snack internals]
at nl ([snack internals]
at Zl ([snack internals]
at Xl ([snack internals]
at Kl ([snack internals]
at Ll ([snack internals]
at _a ([snack internals]
at Ol ([snack internals]
at Uo (https://snack-web-player.s3.us-west-1.amazonaws.com/v2/46/static/js/2.5648d2a4.chunk.js:2091:2159580)
Can you share the a reproducible snack example on where you are getting this error? I’m trying to understand which library is throwing the exception and how we can improve the polyfill.
Seems like creating and adding the polyfill is working. Here is snack example that contains all dependencies using the exact versions you shared: moody truffles - Snack
You will have to import the polyfills.ts file at the top of the App.js file in the snack:
import './polyfills';
// rest of the code
May be the r.g. and a.g. part is some internal reference to the error stack references which I can understand might be confusing but can also be related to the nature of library (since the library in the example i shared previously was using bottom-sheets and here it was caused by @react-navigation/drawer).