byCedric / expo-monorepo-example

Fast pnpm monorepo for cross-platform apps built with Expo / React Native and React.
https://docs.expo.dev/guides/monorepos/
MIT License
746 stars 79 forks source link

Running commands with expo in terminal #120

Open samducker opened 5 months ago

samducker commented 5 months ago

Description of the bug

How would you shortly summarise the issue?

I am trying to run commands with expo in the terminal but my keystrokes don't seem to be doing anything for example pressing i to open the simulator. Maybe there is something I need to do to tell turbo repo the command needs to go to expos dev server instead of another package?

To Reproduce

What steps did you perform which led to this issue?

Installed the repo from fresh and ran pnpm run dev:mobile

Expected behavior

What did you expect to have happened?

Simulator to launch or menu to toggle respective to the keystroke I pressed

Actual behaviour

What did it actually result in?

Nothing happened

Additional context

Can you further explain the issue? E.g., information about version/environment or screenshots.

https://github.com/byCedric/expo-monorepo-example/assets/25123915/4f2cae46-07ee-450f-ab64-a3cd4058a966

pnpm dev:mobile

> @snacked/monorepo@ dev:mobile /Users/sam/Documents/GitHub/house-of-duck/snacked
> turbo dev --filter="{./apps/mobile}..."

╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│                  Update available v1.13.4 ≫ v2.0.6                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v2.0.6    │
│           Run "npx @turbo/codemod@latest update" to update           │
│                                                                      │
│        Follow @turborepo for updates: https://x.com/turborepo        │
╰──────────────────────────────────────────────────────────────────────╯
• Packages in scope: @snacked/app-mobile, @snacked/eslint-config, @snacked/feature-home, @snacked/ui
• Running dev in 4 packages
• Remote caching disabled
@snacked/app-mobile:dev: cache bypass, force executing feccc39f2c722c11
@snacked/ui:dev: cache bypass, force executing 5865e8a31920e061
@snacked/feature-home:dev: cache bypass, force executing bdbb083d9eeab767
@snacked/app-mobile:dev: 
@snacked/app-mobile:dev: > @snacked/app-mobile@1.0.0 dev /Users/sam/Documents/GitHub/house-of-duck/snacked/apps/mobile
@snacked/app-mobile:dev: > expo start
@snacked/app-mobile:dev: 
@snacked/feature-home:dev: 
@snacked/feature-home:dev: > @snacked/feature-home@1.0.0 dev /Users/sam/Documents/GitHub/house-of-duck/snacked/packages/feature-home
@snacked/feature-home:dev: > tsup --watch --silent
@snacked/feature-home:dev: 
@snacked/ui:dev: 
@snacked/ui:dev: > @snacked/ui@1.0.0 dev /Users/sam/Documents/GitHub/house-of-duck/snacked/packages/ui
@snacked/ui:dev: > tsup --watch --silent
@snacked/ui:dev: 
@snacked/app-mobile:dev: (node:7552) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
@snacked/app-mobile:dev: (Use `node --trace-deprecation ...` to show where the warning was created)
@snacked/app-mobile:dev: Starting project at /Users/sam/Documents/GitHub/house-of-duck/snacked/apps/mobile
Starting Metro Bundler
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
@snacked/app-mobile:dev: █ ▄▄▄▄▄ █ ▄▄ █▄▄ ████▄▄▀███ ███ ▄▄▄▄▄ █
@snacked/app-mobile:dev: █ █   █ ██▄█▀▀▄█▀▀ ▄█▀   ▄ ▀▄ █ █   █ █
@snacked/app-mobile:dev: █ █▄▄▄█ █ ▀▀▄ ▀▀▄ ▀ █ ▄▀█▀▄ █▀█ █▄▄▄█ █
@snacked/app-mobile:dev: █▄▄▄▄▄▄▄█ ▀▄█▄▀▄█▄█▄█▄█▄█ █ ▀ █▄▄▄▄▄▄▄█
@snacked/app-mobile:dev: █   ██ ▄▀ ▄█▄ ▄█▄ █  ██▀▀█▀█▀ ▄ ▄▄█▀  █
@snacked/app-mobile:dev: █▀██▄▄█▄█ ▀█▀ ▄ ▀ ▄   ▄▄▄ ██▄ ▀▀▄▀ ▄▀▄█
@snacked/app-mobile:dev: █▀ ▀█▀▀▄ ▀█▀██  ██▀▄▀▄█▄▀ █▀▀ ▄ █████ █
@snacked/app-mobile:dev: █▄▀▀▄ █▄█▄█ ▄█▀█▄███ ▄▄▀ ▄▄█▄▀▀▀▀▀ ▄▀ █
@snacked/app-mobile:dev: █▄▀▀██▀▄ ▀▄ ▄ ▄█▄ █  ██  ▀▀▄  █  █ ▀▄▀█
@snacked/app-mobile:dev: █▄█▄███▄▄▀ ▀▀ ▄ ▀ ██▄██ ▄▀▄▀  ▀▄▄▄██▄▄█
@snacked/app-mobile:dev: █ ██ ▄▀▄   ███  █▄▀ ▀█▄█ ▀██ ▀▀ ▀█ ▀  █
@snacked/app-mobile:dev: █ █▄█▀▀▄▄█▄ ▄█▀█▄█▄ ▄█▄  ▀█ ▄▀▄█▀▄▀▄█▄█
@snacked/app-mobile:dev: ███▀▄  ▄▄▀ ▄▄ ▄█ ██▄ ██▄▀█▀█  ▀  █ ▀ ▀█
@snacked/app-mobile:dev: █▄▄█▀▄▄▄▀█ █▀ ▄ ▄▄▄▀  ▄▀ ▀▄█▄ ▄▄▄█▀▄▀▄█
@snacked/app-mobile:dev: █▄▄█▄▄█▄█▀▄ ██  ▀██ ▄ █ ▀▄▀█▄ ▄▄▄  ▀█ █
@snacked/app-mobile:dev: █ ▄▄▄▄▄ █▀▄▀▄█▀█▄▄█  ▄█▄▄ ▄ ▀ █▄█ ▀█▀▄█
@snacked/app-mobile:dev: █ █   █ ██▀▀▄ ▄█ █▄█ █▄█ ▀██ ▄ ▄   ▀ ▄█
@snacked/app-mobile:dev: █ █▄▄▄█ █ █▀▀ ▄ ▄▄▄ ▄▀██  ▄▀█▀ ▀▀  ██▄█
@snacked/app-mobile:dev: █▄▄▄▄▄▄▄█▄████▄▄███▄▄▄█▄█▄██▄▄████▄██▄█
@snacked/app-mobile:dev: 
› Metro waiting on exp+expo-monorepo://expo-development-client/?url=http%3A%2F%2F192.168.1.69%3A8081
› Scan the QR code above to open the project in a development build. Learn more

› Web is waiting on http://localhost:8081

› Using development build
› Press s │ switch to Expo Go
@snacked/app-mobile:dev: 
@snacked/app-mobile:dev: › Press a │ open Android
@snacked/app-mobile:dev: › Press i │ open iOS simulator
@snacked/app-mobile:dev: › Press w │ open web
@snacked/app-mobile:dev: 
@snacked/app-mobile:dev: › Press j │ open debugger
@snacked/app-mobile:dev: › Press r │ reload app
@snacked/app-mobile:dev: › Press m │ toggle menu
@snacked/app-mobile:dev: › Press o │ open project code in your editor
@snacked/app-mobile:dev: 
samducker commented 4 months ago

@byCedric do you know the solution to this?

thenbe commented 4 months ago

Going by the video alone, I think this is caused by turborepo. Usually, task runners like turborepo expose an option that forces them to stop intercepting keyboard input. Examples include task's interactive: true or process-compose's is_tty=true.

I don't know what the equivalent of this for turborepo is. Maybe try TURBO_UI=false or maybe their new tui mode. I would also search their issues for mentions of tty, interactive, etc to see if an official workaround is documented.