react-native-cards-swipe
react-native-cards-swipe copied to clipboard
Failed to initialize react-native-reanimated library
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
const presets = ['module:metro-react-native-babel-preset'];
const plugins = [
['module-resolver', {alias, extensions}, 'react-native-reanimated/plugin'],
];
module.exports = {presets, plugins};
Hi, were you able to fix this error? I am also experiencing issues too.
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