'Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project

I am working with React Native & I am getting this error:

"Requiring module "node_modules/react-native-reanimated/src/Animated.js", which threw an exception: Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?"

and my app appears to not be working after I installed Secure Store. It would not open then told me to update my emulator which I did, in turn that deleted all my dependencies. I reinstalled all of them, erased node modules and ran Yarn Install to reinstall everything. Now this error keeps popping out. Any advice would be appreciated...I am trying to figure this out so I can continue learning in my bootcamp. Screenshot



Solution 1:[1]

This is how your babel.config.js file should look like

 module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      'react-native-reanimated/plugin',
      [
        'module-resolver',
        {
          root: ['./'],
          extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'],
          alias: {
            '@src': './src',
            '@res': './res',
          },
        },
      ],
    ],
  };
};

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yawning Outside