-
Notifications
You must be signed in to change notification settings - Fork 907
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
react-native bundle command fails to find metro.config.js #2042
Comments
So I found a fix, in loadMetroConfig I pass const projectConfig = await resolveConfig(options.config, ctx.root); It works, but the question is why |
@huntie Do you have any idea? 👀 |
This is the PR that introduced this change: #1889 |
@DaniyarJakupov Thanks for spotting this! Note that the result of |
@huntie thank you for the quick response! Yes, as soon as that check passes, |
Environment
Description
We have a react-native-web project with the following structure:
After upgrading react-native to 0.72.3
react-native bundle
command fails withNo metro config found in /Users/.../Documents/ProjectFolder.
It happens during bundling phase of codepush release. The command is run from
ProjectFolder
root directory so--config
and some other flags are passed with correct paths:I tried to debug
buildBundle
in/cli-plugin-metro/src/commands/bundle/buildBundle.ts
andargs
are there including config:The error happens here when
loadMetroConfig
is called.In
function loadMetroConfig(ctx, options = {})
, options arg is defined:But then this block happens:
and here projectConfig.isEmpty is true:
The question is why
resolveConfig
does not take into account custom path tometro.config.js
? In factoptions
are not even passed to it.This is @react-native-community/cli version that is installed
The text was updated successfully, but these errors were encountered: