question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reanimated workletInit is not a function

See original GitHub issue

Trying to follow along with the gestures tutorial to create a draggable view and I get the following error when trying to use the usePanGestureHandler hook.

TypeError: global.__reanimatedWorkletInit is not a function. (In 'global.__reanimatedWorkletInit(_f)', 'global.__reanimatedWorkletInit' is undefined)

I see there’s an issue in reanimated related to this, do I need to downgrade?

Package versions are:

"react-native-reanimated": "^2.0.0-alpha.9.1",
"react-native-redash": "^15.11.1"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (5 by maintainers)

github_iconTop GitHub Comments

32reactions
thisisgitcommented, May 12, 2021

Thanks to this post, simply adding import 'react-native-reanimated'; on top of the file solved my issue.

10reactions
nandorojocommented, Apr 28, 2022

This issue is happening on Web in v2.8.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: global.__reanimatedWorkletInit is not a function. (In ...
I am using React Native (not expo). I don't even have reanimated downloaded. I had it downloaded then I removed it and rebuilt...
Read more >
r.g.__reanimatedWorkletInit is not a function in expo snack
react native reanimated error r.g.__reanimatedWorkletInit is not a function. My apps is correctly working on my laptop. I am using VScode editor ...
Read more >
runOnJS | React Native Reanimated - Software Mansion
runOnJS. When you call a function on the UI thread you can't be sure if you're calling a worklet or a callback from...
Read more >
typeerror: _reanimatedmodule.default.configureprops is not a ...
configureProps is not a function. (In '_ReanimatedModule.default.configureProps(Object.keys(NATIVE_THREAD_PROPS_WHITELIST), ...
Read more >
[Solved]-react-native-reanimated 2: cannot make a function ...
Coding example for the question react-native-reanimated 2: cannot make a function with 'worklet' keyword (undefined is not a function)-React Native.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found