Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to initialize react-native-reanimated library #15

Open
ghost opened this issue Dec 7, 2022 · 2 comments
Open

Failed to initialize react-native-reanimated library #15

ghost opened this issue Dec 7, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 7, 2022

Error: Failed to initialize react-native-reanimated library, make sure you followed installation steps here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

also try :npm start -- --reset-cache

"react-native-reanimated" : '2.11.0'
"react-native-cards-swipe": "^1.2.1",
babel.config.js
const alias = {'^@/(.+)': './src/\1'}; // @/folder will be an alias to /src/folder
const extensions = ['.android.js', '.ios.js', '.js', '.json', '.native'];

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

@Tahmid11
Copy link

Hi, were you able to fix this error? I am also experiencing issues too.

@rein96
Copy link

rein96 commented Aug 23, 2023

You need to install react-native-reanimated properly by following the guide, I guess you miss these steps

Step 2: Add Reanimated's babel plugin
Add react-native-reanimated/plugin plugin to your babel.config.js.

  module.exports = {
    presets: [
      ... // don't add it here :)
    ],
    plugins: [
      ...
      'react-native-reanimated/plugin',
    ],
  };

Step 3: Clear cache (recommended)
yarn start --reset-cache

Reference: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/#step-2-add-reanimateds-babel-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants