react-native-reanimated: Reanimated 2 failed to create a worklet

When I import Animated in my file, no matter I use it somewhere or not, every time it says that Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?.

My babel.config.js

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin'],
};

I’m using ^2.0.0-rc.3 version.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 28 (4 by maintainers)

Commits related to this issue

Most upvoted comments

yarn start --reset-cache helped in my case on Android.

npx react-native start --reset-cache solved my issue

Same situation here:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin']
};
Screen Shot 2021-03-01 at 6 58 36 PM

The same is happening to me 😦 Screen Shot 2021-02-25 at 15 40 39

I also can confirm it does work, so I’m going to close this issue.

It’s solved now, I ran the app on the real device, it had no problem and then everything was ok in the simulator

Same issue, fresh new react native project

Also seeing this in a fresh react-native app (using react-native-reanimated 2.0.0-rc.3)

None of these solutions has worked for me, and I’m surprised the bug is closed because “use yarn instead of npm” doesn’t feel like a solution. (Even if it did work, which it didn’t for me.)

For anyone else in this situation, reverting to the last stable as @valfirst did ^^ seems to be the only surefire fix.

In package.json:

"dependencies": {
  "react-native-reanimated": "^1.13.2",
  ...
}

@jakub-gonet fyi in case this ongoing thread is muted for you

Still an issue for me on a fresh npx react-native init project, have only used yarn to install dependencies, tried cleaning yarn cache. Both on a real ios device and simulator.

@hitanshuGajjar20 Great, thanks, will keep it in mind. Btw, I switched to yarn a couple of days ago

yarn start --reset-cache helped in my case on Android.

This is also not helping me

I am also getting the same issue even after following all the instruction i have also tried to reset cache

can anyone help me Please