Skip to content

TurboModuleRegistry Can't Find Turbo Native Module #2456

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

Open
wallpunch opened this issue Apr 7, 2025 · 2 comments
Open

TurboModuleRegistry Can't Find Turbo Native Module #2456

wallpunch opened this issue Apr 7, 2025 · 2 comments
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@wallpunch
Copy link

Environment

react-native -v: 10.9.2
npm ls react-native-macos: [email protected]
node -v: v23.10.0
npm -v: 10.9.2
yarn --version: -bash: yarn: command not found
xcodebuild -version: Xcode 16.2 \ Build version 16C5032a

Steps to reproduce the bug

  1. Follow the steps here to create a new project with a Turbo Native Module: https://reactnative.dev/docs/turbo-native-modules-introduction (but add an "npx react-native-macos-init" step and use the macOS project for the iOS steps)
  2. Start Metro ("npm start")
  3. Build the project in Xcode

Expected Behavior

App should load successfully

Actual Behavior

Metro gives an error: TurboModuleRegistry.getEnforcing(...): 'NativeLocalStorage' could not be found. Verify that a module by this name is registered in the native binary.

Reproducible Demo

No response

Additional context

No response

@wallpunch wallpunch added the bug Something isn't working label Apr 7, 2025
@jamonholmgren
Copy link

Just in case it's related to what I ran into, make sure you are running RCT_NEW_ARCH_ENABLED=1 pod install --project-directory=macos (even if you've modified your Podfile).

More info here: #1821 (comment)

@Saadnajmi
Copy link
Collaborator

I think I would have expected you don't need that flag for turbomodules too, so that's still a break in user expectation. Especially because that is enabled upstream for RN Core and iOS, but not for macOS (we haven't finished the fabric renderer). Thank you for figuring it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

3 participants