-
Notifications
You must be signed in to change notification settings - Fork 83
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
sentry-cli fails in yarn monorepo setup #217
Comments
what version of |
4.0.3 |
so what's the output when you run |
Output: |
I think this is an upstream sentry problem: As you pointed out, What we need is a way to override the cli executable here: https://github.com/getsentry/sentry-react-native/blob/master/sentry.gradle#L95. Since you're in the bare workflow, you can do this now by adding |
@cruzach @byCedric It was my understanding that Expo Config Plugins ( https://docs.expo.dev/guides/config-plugins/ ) allow Managed EAS Build projects to use libraries that require native changes. From what I can see, It's certainly possible to get Sentry working in a bare RN monorepo - there's just a couple of extra native steps required. So while it would be nice for Sentry to remove the need for those steps (which I think they have on their radar in getsentry/sentry-react-native#1912 ), wouldn't a good solution in the mean time be to update the sentry-expo Config Plugin to check for a monorepo structure, and if so make these extra tweaks? I believe all the error messages people are reporting are the same ones you'd see if you have a bare RN project and hadn't applied the final steps. It's very unfortunate at the moment that EAS Build + Monorepo + Sentry seem completely incompatible at the moment (no workaround that I'm aware of). Here are the extra steps that have worked for me in the past (beyond what
|
Hi @jamesisaac! You are correct that this is an unfortunate moment for Sentry and Expo in monorepos. You probably already seen:
We need the To combat that, we need a reliable solution for all monorepos. That's where the |
Thanks Cedric, yeah I saw that they've now logged the Apologies if I've misunderstood the nature of Expo Config Plugins, but aren't they run before every EAS Build? In which case, couldn't some equivalent of |
No worries, if you have questions I'm happy to answer it 😄
Partially yes, but only for managed projects. If you have an ejected project we don't regenerate your native files. We want to avoid overwriting any customizations made. It's super hard to detect these changes, that's why we stay away from that in ejected.
Yes, and that's also why we need a single source of truth for this setting. If this path changes, for any reason, users should be able to quickly correct it. Not having to go through all build phases to manually edit the paths. And that's also exactly why we would need the |
Facing a similar issue after following installation steps, it's a monorepo setup. The issue seems to be slightly different as it gets the CLI path now.
I tried debugging in |
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem. |
If you still have some issues, you can try this: byCedric/expo-monorepo-example#32 (comment) |
Summary
We have an expo app inside a yarn monorepo workspace and our build fails with:
The call to
/build/workingdir/build/apps/sh.hae.app/node_modules/@sentry/cli/bin/sentry-cli
fails because yarn installs @sentry/cli in the workspace root i.e./build/workingdir/build/node_modules
Expo uses
require.resolve
within gradle to find package locations in yarn monorepos. e.g.new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute().text.trim(), "../native_modules.gradle");
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
No response
Environment
Reproducible demo or steps to reproduce from a blank project
The text was updated successfully, but these errors were encountered: