nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.35k stars 2.33k forks source link

Start executor not displaying QR Code #27936

Open bkrupa opened 1 week ago

bkrupa commented 1 week ago

Current Behavior

When running @nx/expo:start the QR code for loading the app on a device isn't displayed.

Expected Behavior

The QR code should be displayed

GitHub Repo

No response

Steps to Reproduce

  1. Create an app with nx g @nx/expo:application
  2. Run nx start {application_name}
  3. Notice that no QR code is displayed

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.17.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.8.3

nx                 : 19.7.3
@nx/js             : 19.7.3
@nx/jest           : 19.7.3
@nx/linter         : 19.7.3
@nx/eslint         : 19.7.3
@nx/workspace      : 19.7.3
@nx/detox          : 19.7.3
@nx/devkit         : 19.7.3
@nx/esbuild        : 19.7.3
@nx/eslint-plugin  : 19.7.3
@nx/expo           : 19.7.3
@nx/node           : 19.7.3
@nx/playwright     : 19.7.3
@nx/react          : 19.7.3
@nx/react-native   : 19.7.3
@nrwl/tao          : 19.7.3
@nrwl/vite         : 19.7.3
@nx/web            : 19.7.3
@nx/webpack        : 19.7.3
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/expo/plugin
@nx/jest/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
@nxlv/python : 19.0.2

Failure Logs

No response

Package Manager Version

npm 10.8.3

Operating System

Additional Information

This is the same issue referenced in https://github.com/nrwl/nx/issues/26529 but I couldn't respond to that issue because it was locked.

The issue is that stdout in the executor is not TTY, which causes the expo CLI to not display the QR code and other information: https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/utils/interactive.ts#L5

This might be intended behavior from the nx team, but I'm not familiar enough with the nx infrastructure to know how to make this executor have a TTY stdout. Happy to contribute if there's an easy path forward.

bkrupa commented 1 week ago

Perhaps some change similar to this? https://github.com/nrwl/nx/compare/master...bkrupa:nx:bugfix/expo-tty-executor