-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
V3 Failed to create a worklet. Did you forget to add Reanimated Babel plugin in babel.config.js? #4506
Comments
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? |
It seems we have the same issue #4507 , I added some details |
Actually in my case the error didn't pop up on the update but on a clean boot of the application (deleting node_modules, package-lock.json, Pods and Podfile.lock) |
Ye, but I think it's related to the same issue, I'll try to find out why |
This comment was marked as spam.
This comment was marked as spam.
Hey @domenicoprestia, thanks for reporting this issue. Can you please check if #4511 fixes your problem? |
@tomekzaw i have the same issues, but the fixes in your PR work. |
Can anyone confirm if it also works on web (with react-native-web)? |
Yes i will try, thanks :) |
Thank you for the PR @tomekzaw, do we have any ETA for the next release with this fix? 🙏 |
@peterjskaltsis You can use |
Perfect, thank you! |
I tried out the nightly build but got the follow errors.
|
Any solution? This problem is still present when I try to run |
@alejandro-geeksquare Not been able to resolve this yet. |
which version are you using? |
Tried again last week after we updated to I was on Android didn't get round to trying on iOS. |
It seems strange, can you provide a minimal reproduction repo? Maybe it isn't related to this issue, what is your babel config? |
i am also having this problem.
|
Not working for me as well
babel.config.js
|
"react-native-reanimated": "^3.4.2", its working "devDependencies": { |
module.exports = { |
to be honest, i don't really know what i did to fix it, but try cleaniung everything and running with |
Also having the same issue
|
@gilhrpenner Reanimated docs clearly state that you need to add |
Issue persists for bable config:
checked the compatibility here https://docs.swmansion.com/react-native-reanimated/docs/guides/compatibility/ edit: tried everything cleaning cache, reinstalling node modules, gradle clean build with every combination and nothing worked |
This comment was marked as duplicate.
This comment was marked as duplicate.
@0xdevanshu There's a problem in your module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
[
'module:react-native-dotenv',
{
moduleName: '@env',
path: '.env',
},
- 'react-native-reanimated/plugin',
- ],
+ ],
+ 'react-native-reanimated/plugin',
],
}; |
I was facing the same issue running |
adding resetCache: true, in metro.config.js solved my problem |
We managed to resolve this issue finally turned out to be an outdated
|
Yes, this worked for me!!! Thanks. |
Description
Error: Failed to create a worklet. Did you forget to add Reanimated Babel plugin in babel.config.js?
This error appeared randomly when i was rebuilding my application on an update branch (didn't do any particular change to packages when the error popped up, and i already had rebuilt many times the app on this branch), in production everything works fine an correctly, but when i try to launch the app on the simulator this error pops up, both on android and ios, this is a preview of my babel.config.js:
module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ ['module:react-native-dotenv', { 'envName': 'APP_ENV', 'moduleName': 'react-native-dotenv', 'path': '.env' }], 'react-native-reanimated/plugin' ] };
is there something i'm missing? i didn't actually change anything and even clearing the whole env many times and restarting the pc didn't actually solve anything (i've also tried to go with npm start -- --reset-cache but nothing)
I've found other issues on the repo, also from reanimated v2 but every solution was leading to the babel.config.js, and to me mine looks correct.
Steps to reproduce
Snack or a link to a repository
The repo is private
Reanimated version
3.2.0
React Native version
0.71.8
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: