Skip to content

Conversation

DonutsInBelly
Copy link

Hey, I found a bug while following the CLI installation guide for react native reusables

Starting a fresh project and running bun run dev I encountered this error:

› Metro waiting on exp://192.168.4.88:8081
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Web is waiting on http://localhost:8081

› Using Expo Go
› Press s │ switch to development build

› Press a │ open Android
› Press i │ open iOS simulator
› Press w │ open web

› Press j │ open debugger
› Press r │ reload app
› Press m │ toggle menu
› shift+m │ more tools
› Press o │ open project code in your editor

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
λ Bundling failed 281ms node_modules/expo-router/node/render.js (1 module)
Web Bundling failed 290ms node_modules/expo-router/entry.js (1 module)

Metro error: node_modules/expo-router/node/render.js: [BABEL] <removed my local app path>/node_modules/expo-router/node/render.js: Cannot find module 'react-native-worklets/plugin'

Adding react-native-worklets as a dev dependency fixed this. I'm not sure why this was needed, it looks like this is required due to babel config which just uses nativewind's babel config which is here: https://github.com/nativewind/react-native-css

I think this dependency has been in their config for a while, so I'm not sure why this is needed now. I'm also not sure how to test that this particular change will work, if you have any direction on setting up a test, I'd be happy to test this change before a merge.

@mrzachnugent
Copy link
Member

Hey @DonutsInBelly , sorry I missed this PR.

I pinned Nativewind to version 4.1.23 in this commit because the latest Nativewind release targets Expo SDK 54, which depends on Reanimated v4 and react-native-worklets.

Since the templates are still on Expo SDK 53, using the latest version would cause compatibility issues.

I’ll update the templates to Expo SDK 54 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants