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

Struggling to run the example app #146

Open
trcoffman opened this issue Mar 7, 2025 · 10 comments · May be fixed by #148
Open

Struggling to run the example app #146

trcoffman opened this issue Mar 7, 2025 · 10 comments · May be fixed by #148

Comments

@trcoffman
Copy link

Hi there.

I'm trying to build the iOS example app on commit ef12942 and it doesn't seem to work.

Image

I've been trying to debug some accessibility issues we are having with Zeego and I figured the best place to start would be the example app, but I've been having a lot of issues trying to run it.

My understanding is that you're supposed to do the following to run the example:

yarn install
yarn bootstrap
yarn example ios --device

What am I doing wrong?

@trcoffman trcoffman changed the title Example app does not work Struggling to run the example app Mar 7, 2025
@nandorojo
Copy link
Owner

Hey those steps are wrong

yarn
npx expo prebuild
npx expo run:ios

@trcoffman
Copy link
Author

I have tried that as well and had the same results. Having slept on it, and looking closely at the monorepo config, I think I have some ideas on how I can fix things. I'll submit a PR if I get it working. I'm really confused as to why it works for you.

@nandorojo
Copy link
Owner

You just have to run that from the example folder, works for me

@nandorojo
Copy link
Owner

Also run yarn from the root

@trcoffman trcoffman linked a pull request Mar 7, 2025 that will close this issue
@trcoffman
Copy link
Author

trcoffman commented Mar 7, 2025

@nandorojo I have no idea why it works for you. The example app really should have @react-native-menu/menu, react-native-ios-utilities, and react-native-ios-context-menu as direct dependencies for react-native autolinking to work. On master these are transitive dependencies, which shouldn't actually work right.

PR #148 should get things into a better state, but there's still problems with the monorepo. Right now the example app uses zeego version 3.0.0-alt.1 where it really should be set up to depend on version workspaces:* so it picks up zeego right from the monorepo. There should also only be a single yarn.lock in the repo. I know you're really busy so dealing with these kinds of tech debt things are a lot to deal with, but they make it harder for outside contributors to get things running and help out.

@nandorojo
Copy link
Owner

The transitive deps thing might be a regression from the other day.

The workspaces thing doesn’t matter because it’s configured in metro and tsconfig I believe

Think you’re correct though, installing the peer deps directly in the example should actually be the fix.

@trcoffman
Copy link
Author

Having multiple yarn.lock is a problem though. You should be able to run yarn install in the root of the repo and its should install dependencies for the entire repository. Right now you have to run it twice, once in the root and once in the example.

@nandorojo
Copy link
Owner

That’s actually common in setups like this. It shouldn’t be an issue

@nandorojo
Copy link
Owner

The monorepo + react native + local fast refresh in dev stuff can be such a mess. Once it works you leave it lol

@trcoffman
Copy link
Author

trcoffman commented Mar 7, 2025

Yeah I hear you. We have it super dialed in at AppFolio with moonrepo and yarn v4 and all the typescript project references working great. It took a lot of work to figure out though.

I validated that the PR I dropped gets things in a pretty good state. I tested it by doing the following

# in root of repo
git clean -fdx # restores repo to clean state as if freshly checked out
yarn install
cd examples/expo
yarn install
yarn expo prebuild --clean
yarn expo run:ios --device

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

Successfully merging a pull request may close this issue.

2 participants