Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When adding unstable_enablePackageExports = true to config and starting the dev server with expo dev, the app crashes and it looks like there's an issue with error reporting inside of metro.
iOS Bundling failed 1871ms node_modules/expo-router/entry.js (4294 modules)
ERROR TypeError: Right-hand side of 'instanceof' is not an object
at ModuleResolver.resolveDependency (/project-path/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:130:24)
at DependencyGraph.resolveDependency (/project-path/node_modules/metro/src/node-haste/DependencyGraph.js:235:43)
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.
Not sure how to repro since I think there's an underlying issue with my repo but this is about the failure to properly throw the error.
What is the expected behavior?
I get a useful error.
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
Do you want to request a feature or report a bug? Bug
What is the current behavior? When adding
unstable_enablePackageExports = true
to config and starting the dev server withexpo dev
, the app crashes and it looks like there's an issue with error reporting inside of metro.If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can
yarn install
andyarn test
.Not sure how to repro since I think there's an underlying issue with my repo but this is about the failure to properly throw the error.
What is the expected behavior?
I get a useful error.
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
node: 20.16.0 pnpm: 9.6.0 os: macos Sonoma 14.7 metro: 0.81.0 expo: 52.0.7 RN: 0.76.2
Project is in a pnpm + turborepo monorepo.
Full metro config: