Error: Reanimated 2 failed to create a worklet — Maybe You Forgot to Add Reanimated’s babel Plugin?

If you ever chance upon this error, fret not. Pop over to babel.config.js, simply add 'react-native-reanimated/plugin' under “plugins” in'module.exports' (The above is a basic example to recreate the…

If you ever chance upon this error, fret not. Pop over to babel.config.js, simply add 'react-native-reanimated/plugin' under “plugins” in'module.exports'

Solution

In babel.config.js,

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

(The above is a basic example to recreate the error and solution. Your babel.config.js might be different. As long as the 'react-native-reanimated/plugin' is added correctly, the error should be resolved after restarting the development server and running npx react-native start --reset-cache .

Enjoyed this article?

Share it with your network to help others discover it

Continue Learning

Discover more articles on similar topics