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

Fix example app #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix example app #148

wants to merge 3 commits into from

Conversation

trcoffman
Copy link

Objective

This PR fixes various issues that I encountered when trying to run the example app.

Resolves #146

Description

Add native peer dependencies to example project

For react-native's native module auotlinking to function properly, all native dependencies must be direct dependencies of the app. Native dependencies should never be transitive dependencies.

Also, note that the dependency versions don't match the ones in packages/zeego/package.json. This is because this example project doesn't actually depend on the workspace version of zeego, it depends on 3.0.0-alt.1 which depends on these versions of the native packages.

What really should be done, but which I ran out of time to do, is to remove the yarn.lock in this example project directory and have this example app depend on 'workspace:*' version of zeego so that the monorepo is in a healthy state and this example app runs the code that is in the monorepo for zeegoo. I attempted to do this and I encountered build errors compiling expo-modules.

There really should only be 1 yarn.lock in a yarn monorepo.

Fix mismatched dev/peer dependencies in package/zeego

Native packages should have the exact same value in devDependencies as they do in peerDependencies.

Fix yarn install making working directory dirty

Running yarn install should not cause the working directory to have
uncommitted changes.

  1. Remove examples/expo/.yarn/install-stage.gz. This file should not be checked into git. In fact, it shouldn't exist because there shouldn't be multiple yarn.lock files in a monorepo.
    I attempted to resolve this, but ran into more issues than I have time to fix, so instead I'll just remove this so that yarn install at least does not cause there to be uncommitted changes in the working directory.

  2. Commit the change to packages/zeego/package.json
    yarn install sorts the packages in package.json, so commit these changes.

Running yarn install should not cause the working directory to have
uncommitted changes.

1) Remove examples/expo/.yarn/install-stage.gz
This file should not be checked into git. In fact, it shouldn't exist
because there shouldn't be multiple yarn.lock files in a monorepo.

I attempted to resolve this, but ran into more issues than I have time
to fix, so instead I'll just remove this so that yarn install at least
does not cause there to be uncommitted changes in the working directory.

2) Commit the change to packages/zeego/package.json

yarn install sorts the packages in package.json, so commit these
changes.
Native packages should have the exact same value in devDependencies as
they do in peerDependencies.
For react-native's native module auotlinking to function properly, all
native dependencies must be direct dependencies of the app. Native
dependencies should never be transitive dependencies.

Also, note that the dependency versions don't match the ones in
packages/zeego/package.json. This is because this example project
doesn't actually depend on the workspace version of zeego, it depends
on 3.0.0-alt.1 which depends on these versions of the native packages.

What really should be done, but which I ran out of time to do, is to
remove the yarn.lock in this example project directory and have this
example app depend on 'workspace:*' version of zeego so that the
monorepo is in a healthy state and this example app runs the code that
is in the monorepo for zeegoo. I attempted to do this and I encountered
build errors compiling expo-modules.

There really should only be 1 yarn.lock in a yarn monorepo.
Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zeego-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 9:57pm

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 this pull request may close these issues.

Struggling to run the example app
1 participant