facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.24k stars 626 forks source link

Official Monorepo guide fails to build #1303

Closed NicoHubrach closed 4 months ago

NicoHubrach commented 4 months ago

Do you want to request a feature or report a bug? bug

What is the current behavior? Metro error: Unable to resolve module

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. I tried setting up a monorepo by following this official guide. Ive come as far and have done everything up to and including the section "change-default-entrypoint". When I try to run the app, by running "yarn web" i get the error: "Metro error: Unable to resolve module ./App from C:...\apps\cool-app\index.js:". this is a minimal working example.

What is the expected behavior? Metro should find the Index file and build correctly

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system. node: v22.4.1 yarn: 1.22.19 OS: Windows 10 Home, Version: 22H2