Closed uhck closed 1 month ago
@uhck hey, just running into this as well. I found this on Expo's documentation:
https://docs.expo.dev/versions/latest/sdk/reanimated/
It looks like they solved the need for additional configuration in an Expo project.
+1
I am on RN 0.75.3 and Reanimated 3.15.2 I don't want to use Expo as RN 0.75.x is still not officially supported in Bare Workflow.
I am on RN 0.75.2 and same thing happened..
@uhck hey, just running into this as well. I found this on Expo's documentation:
https://docs.expo.dev/versions/latest/sdk/reanimated/
It looks like they solved the need for additional configuration in an Expo project.
I'm not working within Expo
I am facing this too. RN 74.5 with expo.
I am having the exact same problem, just after installing react-native-reanimated.
Bare Workflow Mac Studio M3 with MacOS Sequioa 15 XCode 16
npm 10.2.0 react-native-cli: 2.0.1 react-native: 0.75.3
error Cannot find module 'react-native-reanimated/metro.config' Require stack:
my metro.config.js
// metro.config.js
// per: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/
const {
wrapWithReanimatedMetroConfig,
} = require('react-native-reanimated/metro-config');
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
const config = {};
// per: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/
module.exports = wrapWithReanimatedMetroConfig(config);
Note: If I don't do step3, the app builds. Step 3: Wrap metro config with reanimated wrapper (recommended)
Same thing happening to me. Using bare react native 0.74
Tried with all 3.x.x version but didn't work .. finally had to move to 2.17.0 and working fine react-native :- 0.71.6 react :- 18.2.0
I have the same problem, were you able to find a solution? 🤔🤔
I just removed the wrapWithReanimatedMetroConfig
wrapper method in metro.config.js for now... Works fine, it only improves reanimated error messages, hope they still fix it though
In my case I had to check more thoroughly and discovered that the problem actually came from how I was drawing a custom component (a button) and redo that logic to make it work.
Hey guys!
The new metro config wrapper is only available in nightly version. It will be released when the 3.16.0
is published, so stay tuned!
For now, just please skip this step. Once the new version comes out, you will be able to use this feature.
following! I have the same issue. I want to introduce reanimated in my code.
Hey guys!
We finally released the 3.16.0
version where the new metro config wrapper is available. I've just tested on the clean app and it works fine, so you should be able to use it.
Here are two pages in docs that you can refer to:
They are still marked as unreleased because my PR that changes labels is not merged yet but docs are valid now.
Description
I installed and followed the setup instructions here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started
Got to Step 4: clearing the Metro bundler cache Getting error:
Steps to reproduce
npm install react-native-reanimated
react-native-reanimated/plugin
, listed last in babel.config.jsconst config = {}; const mergedConfig = mergeConfig(getDefaultConfig(__dirname), config); module.exports = wrapWithReanimatedMetroConfig(mergedConfig);