Skip to content
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

Metro gets incorrect mode #1397

Open
longvt96 opened this issue Dec 5, 2024 · 0 comments
Open

Metro gets incorrect mode #1397

longvt96 opened this issue Dec 5, 2024 · 0 comments

Comments

@longvt96
Copy link

longvt96 commented Dec 5, 2024

Description

info React Native v0.76.3 is now available (your project is running on v0.74.3).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.3
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.3
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
info Dev server ready

i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app

info Opening app on Android...
info A dev server is already running for this project on port 8081.
info Installing the app...

Task :gradle-plugin:checkKotlinGradlePluginConfigurationErrors
Task :gradle-plugin:compileKotlin UP-TO-DATE
Task :gradle-plugin:compileJava NO-SOURCE
Task :gradle-plugin:pluginDescriptors UP-TO-DATE
Task :gradle-plugin:processResources UP-TO-DATE
Task :gradle-plugin:classes UP-TO-DATE
Task :gradle-plugin:jar UP-TO-DATE

Configure project :app
Reading env from: .env

Configure project :react-native-reanimated
Android gradle plugin: 8.2.1
Gradle: 8.6

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
5 actionable tasks: 1 executed, 4 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

What went wrong:
Cannot locate tasks that match 'app:installDebug' as task 'installDebug' is ambiguous in project ':app'. Candidates are: 'installInhouseDebug', 'installInhouseDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest', 'installStagingDebug', 'installStagingDebugAndroidTest'.

Try:

Run gradlew tasks to get a list of available tasks.
For more on name expansion, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org/.

BUILD FAILED in 3s
info Run CLI with --verbose flag for more details.
info Stopping server
not able to run an app after adding build flavours

Do you want to request a feature or report a bug?
The Metro should be get correct mode.

What is the current behavior?
Currently the Metro get the mode is debug.

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.
Steps to reproduce

Run the command line: ENVFILE=.env.inhouse react-native run-android --mode=inhouseDebug --appIdSuffix 'dev'
On the Metro server, start the Android app.

What is the expected behavior?

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
Metro config:

const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');

/**

const defaultConfig = getDefaultConfig(__dirname);
const {assetExts, sourceExts} = defaultConfig.resolver;

const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};

module.exports = mergeConfig(defaultConfig, config);

Sysyem info:
System:
OS: macOS 14.0
CPU: (8) x64 Apple M1 Pro
Memory: 29.41 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.0.0
path: ~/.nvm/versions/node/v20.0.0/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 9.6.4
path: ~/.nvm/versions/node/v20.0.0/bin/npm
Watchman:
version: 2024.12.02.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK:
API Levels:
- "34"
- "35"
Build Tools:
- 34.0.0
- 35.0.0
System Images:
- android-35 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.21829.142.2421.12409432
Xcode:
version: 15.0/15A240d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 23.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.4
wanted: 0.75.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant