-
-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Description
Describe the bug
When using Storybook v9 with an Nx React Native project, the Metro bundler fails to resolve the tty
module. This occurs during the initial bundling process when trying to run the React Native app with Storybook integration.
To Reproduce
I've created a reproduction repository at nx-monorepo
Steps to reproduce the behavior:
- Clone the reproduction repository
- Run
npm install
- Run
nx pod-install mobileApp
to install iOS dependencies - Run
nx run-ios mobileApp
- The Metro bundler will fail with a
Cannot resolve tty
error
Expected behavior
The Metro bundler should successfully resolve all dependencies and start the React Native app with Storybook integration. The app should load and display the Storybook UI without any bundling errors.
Screenshots

Code snippets
The error occurs during Metro bundling:
Welcome to Metro v0.81.5
Fast - Scalable - Integrated
ERROR Error: Cannot resolve tty
at .../nx-monorepo/node_modules/@nx/react-native/plugins/metro-resolver.js:31:15
System:
- Node.js version: v22.15.1
- Storybook version: 9.0.6
- Nx version: 21.1.3
- Metro config version: 0.77.2
- Operating System: macOS (darwin 24.3.0)
- Package Manager: npm
Additional context
Environment details:
- Using an Nx monorepo setup with React Native
- React Native app is configured as an Nx application
Repository structure:
- Nx monorepo
- React Native app located in
apps/mobileApp
- Using standard Nx React Native configuration
Feofilov and loudy
Metadata
Metadata
Assignees
Labels
No labels