Expo Snack a.g.__reanimatedWorkletInit is not a function.

I installed “react-native-reanimated”: “~2.8.0”, so that I can make use of “@gorhom/bottom-sheet”: “^4”, however once I imported bottom-sheet I received this error.
a.g.__reanimatedWorkletInit is not a function.

I’m not sure how to fix this on Snack. Others recommend clearing the cache eg. expo -c
but there is no access to command line in Snack.

Hey @bajah, this seems to be a known issue with the dependency version incompatibility and there is been some work going on around it.

For now, I can only suggest a workaround for this by adding a polyfill. Please see this snack: reanimated-bottom-sheet-polyfills-workaround - Snack

In the polyfills.ts file, you will see some similar issues commented out and the progress on those issues.

1 Like

Thank you @amanhimself. That was very helpful.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.