Closed stefanofgithub closed 1 year ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Snack or a link to a repository section.
my babel.config.js
module.exports = { presets: [ 'module:metro-react-native-babel-preset', ], plugins: [ "react-native-reanimated/plugin", ], };
Apparently solved only by installing "react-native-reanimated": "^3.6.0-nightly-20231009-59ef55fcb", but other problems follow
@tomekzaw It seems related to newly introduced API for integrating with worklers:
@stefanofgithub Do you use createWorkletRuntime
in your code? Was the app working before?
@stefanofgithub Not sure if yarn ios cache clean
is a correct command here.
Can you please try yarn start --reset-cache
in order to reset Metro bundler cache?
Having the same issue here. I am using npx expo run:ios to start the app and I tried also with npx expo run:ios --no-build-cache. No result.
I also tried installing different versions of reanimated, couldn't find one to work on my env. I ended by giving up, but if you have other solutions to try I would be very grateful.
Packages: "react-native": "0.70.8", "react-native-reanimated": "^3.5.4", (and many more)
@dianatalpos Can you please share a repro with us so we can take a look at it?
Also, --no-build-cache
seems to be a Gradle flag (see here) and not related to this issue. Could you please try running npx expo start -c
in order to reset Metro bundler cache?
@tomekzaw I cannot share the original repo, but I will create a new app with the same dependencies and share it with you as soon as possible. As I ran the expo prebuild, the app cannot be run using the start command, I have to start it on specific platform.
I'm encountering a similar problem and receiving the exact same error.
I'm going to attempt downgrading the version once more, even though it failed before. I will also try creating a project from scratch and then share my findings with you.
Hey @hitendramalviya, thanks for your comment. Can you please let us know if yarn start --reset-cache
works for you? Do you have plugins: ['react-native-reanimated/plugin']
in your babel.config.js
?
I just ran into this issue while updating to 0.72.5 and adding the babel plugin fixed it. Thanks :)
@stefanofgithub Not sure if
yarn ios cache clean
is a correct command here.Can you please try
yarn start --reset-cache
in order to reset Metro bundler cache?
Hi, thanks for your support. The command "yarn start --reset-cache" don't work but before opening this issue I tried to:
in my case, after many attempts, the only command that did not give an error for resetting the cache was:
At the moment I solved it (unfortunately) by removing the navigation drawer and putting the menu button in the bottom tab navigator. This is a temporary solution. In the meantime, I await developments from this report. Thank you all
createWorkletRuntime
@Latropos hi, no I don't use createWorkletRuntime
@tomekzaw, I tried with a separate project. It all worked as expected :), tried in my project and was not working. The next day I tried again, it worked. Honestly, I don't know how this happened.
@dianatalpos Thanks for letting us know! In this ecosystem, sometimes even a reboot is the solution 😉
I'm also getting this same error; however, so far as I've tested on Android, it doesn't occur when I build a preview release... it's only occurring when I'm running locally on an expo-dev-client instance in Android.
When I built a fresh app using the expo templates, it worked fine. In my own app it's borked, but there's a lot of differences between the two so I'm not that surprised.
The deets:
I'll report back if I find anything else peculiar.
@sean-fletching Did you remember to reset Metro cache?
@sean-fletching Did you remember to reset Metro cache?
Yes sir. In fact I just followed this clear cache procedure and it too has resulted in no difference.
Here's my (slightly different) error FWIW:
@tomekzaw I'm currently pairing down my app to see if I can draw out the issue - if I'm unsuccessful, then I'll have a minimal repro example to share 🥂
I failed to notice the structure of my babel.config.js
had my plugins array nested under env.production
hence it did not work in development but did in production.
installing all packages(except expo
react
& react-native
) with npx expo install
worked for me
Hey @hitendramalviya, thanks for your comment. Can you please let us know if
yarn start --reset-cache
works for you? Do you haveplugins: ['react-native-reanimated/plugin']
in yourbabel.config.js
?
i have same issue even if i add this in babel
@JessyAngel07 do you run yarn start --reset-cache
?
@JessyAngel07 do you run
yarn start --reset-cache
?
yes i did...still i got the issuee
@JessyAngel07 do you run
yarn start --reset-cache
?
@tomekzaw what shall i do??
@JessyAngel07 Please try to delete pod.lock file
remove from package.json reanimated and gesture then run -> npm install react-native-reanimated react-native-gesture-handler -> pod install
-> npx react-native start --reset-cache
Should be good?
@JessyAngel07 Please try to delete pod.lock file
remove from package.json reanimated and gesture then run -> npm install react-native-reanimated react-native-gesture-handler -> pod install
-> npx react-native start --reset-cache
Should be good?
@D-Cabs i'm using android
delete your node_modules and install node_modules again with npm install. In Android studio press file in top bar and select invalidate caches. Hope you can get it sorted. @JessyAngel07
@JessyAngel07 this link solved my issue for me . https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/#step-2-add-reanimateds-babel-plugin
basically you would need to add the "react-native-reanimated/plugin" plugin to your babel.config.js file and rebuild your app so it can fix the error
Unlike what we used to do in V1 of renimated, your need to DONT use import 'react-native-reanimated';
in yout index and App files. I am resuming that you followed the installation guide constructions, I mean you did add plugins to your babel.config.js.
i Also had this issue and all it did for me was yarn start --reset-cache
. All good.
Hey @hitendramalviya, thanks for your comment. Can you please let us know if
yarn start --reset-cache
works for you? Do you haveplugins: ['react-native-reanimated/plugin']
in yourbabel.config.js
?
Thank you, @tomekzaw. I forgot to share the updates and solutions that worked for me, which might be beneficial for others. Here are the steps I took:
npx pod-install
.npm start -- --reset-cache
.npm run ios
.Hey @hitendramalviya, thanks for your comment. Can you please let us know if
yarn start --reset-cache
works for you? Do you haveplugins: ['react-native-reanimated/plugin']
in yourbabel.config.js
?
this work for me.
same issue:
"react-native-reanimated": "^3.5.4",
"react-native": "0.72.6",
Mine got fixed by adding react-native-reanimated/plugin last. in the babel.config.js -> plugins array.
Read the docs. Installation
yarn add react-native-reanimated
npm install react-native-reanimated
npx expo install react-native-reanimated
babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
+ plugins: ['react-native-reanimated/plugin'],
};
yarn start --reset-cache
npm start -- --reset-cache
npx expo start -c
Description
When the application is opened it returns the error in question.
package:
Steps to reproduce
yarn && cd ios && pod install && cd .. && yarn ios cache clean
Snack or a link to a repository
.
Reanimated version
3.5.4
React Native version
0.72.5
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
None
Build type
Debug mode
Device
iOS simulator
Device model
Any
Acknowledgements
Yes