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 on Windows: Cannot start server in new window because no terminal app was specified #1160

Closed
feng-yu-healthbank opened this issue Dec 20, 2023 · 1 comment

Comments

@feng-yu-healthbank
Copy link

feng-yu-healthbank commented Dec 20, 2023

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

Report a bug

It's originally raised in StackOverflow https://stackoverflow.com/questions/77684266/react-native-error-cannot-start-server-in-new-window-because-no-terminal-app-wa/77688826

What is the current behavior?

When launching Metro on Windows, it gets "error Cannot start server in new window because no terminal app was specified".

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.

It's really just a fresh react-native project using the standard init.

npx react-native@latest init AwesomeProject && cd ./AwesomeProject && npm run android

If you don't like to run it yourself, I have created a repo for you. No customization whatsoever, just a fresh react-native project.

https://github.com/feng-yu-healthbank/AwesomeProject

Please note the error is specific to Windows.

What is the expected behavior?

The empty project launches into an Android emulator by npm run android.

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

It's a fresh official react-native sample project. No customization is applied.

Metro version

"metro": "^0.80.0"

metro config:

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

/**
 * Metro configuration
 * https://facebook.github.io/metro/docs/configuration
 *
 * @type {import('metro-config').MetroConfig}
 */
const config = {};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);

npx react-native info

System:
  OS: Windows 11 10.0.22621
  CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K
  Memory: 27.55 GB / 63.77 GB
Binaries:
  Node:
    version: 20.10.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 9.7.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman:
    version: 20231008.002904.0
    path: C:\ProgramData\chocolatey\bin\watchman.EXE
SDKs:
  Android SDK:
    Android NDK: 22.1.7171670
  Windows SDK:
    AllowAllTrustedApps: Disabled
    Versions:
      - 10.0.19041.0
IDEs:
  Android Studio: AI-231.9392.1.2311.11076708
  Visual Studio: Not Found
Languages:
  Java: 17.0.9
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.1
    wanted: 0.73.1
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

image

@feng-yu-healthbank feng-yu-healthbank changed the title React Native :error Cannot start server in new window because no terminal app was specified React Native: Cannot start server in new window because no terminal app was specified on Windows Dec 20, 2023
@feng-yu-healthbank feng-yu-healthbank changed the title React Native: Cannot start server in new window because no terminal app was specified on Windows Metro: Cannot start server in new window because no terminal app was specified on Windows Dec 20, 2023
@feng-yu-healthbank feng-yu-healthbank changed the title Metro: Cannot start server in new window because no terminal app was specified on Windows Metro on Windows: Cannot start server in new window because no terminal app was specified Dec 20, 2023
@huntie
Copy link
Member

huntie commented Dec 20, 2023

Hey @feng-yu-healthbank, could you reopen this issue under https://github.com/react-native-community/cli? The run-android command and the --terminal option is part of that project, not in Metro.

@huntie huntie closed this as completed Dec 20, 2023
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

2 participants