fix: add react-native-svg peer dependency instruction for React Native wizard#282
Open
kopchikovich wants to merge 1 commit intoPostHog:mainfrom
Open
fix: add react-native-svg peer dependency instruction for React Native wizard#282kopchikovich wants to merge 1 commit intoPostHog:mainfrom
kopchikovich wants to merge 1 commit intoPostHog:mainfrom
Conversation
…e wizard react-native-svg is a required (non-optional) peer dependency of posthog-react-native, used by the surveys feature. Projects with legacy-peer-deps=true in .npmrc or using package managers that don't auto-install peer deps (yarn, pnpm) silently skip it, causing a build failure: Unable to resolve "react-native-svg". This adds an instruction to the React Native wizard agent context so the AI agent explicitly installs react-native-svg alongside the SDK.
c090a78 to
b87089c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, PostHog team! 👋
I really enjoyed using the wizard; it truly feels magical when it configures everything on its own. However, in my expo project, one small detail was missing for everything to actually work after running a single wizard command. I decided to fix it myself as a thank you and submit a PR. I checked this change on my project, and everything worked!
I also thought about adding a condition and adding this line to prompt only for those package managers where there is no peer dependency installation, but I didn't see the benefit in terms of context savings, etc. But I'm curious to hear what you think!
Here is the description of the problem:
react-native-svgis a required (non-optional) peer dependency ofposthog-react-native, used by the surveys feature. Projects withlegacy-peer-deps=truein.npmrcor using package managers that don’t auto-install peer deps (yarn, pnpm) silently skip it, causing a build failure:This adds an instruction to the React Native wizard agent context so the AI agent explicitly installs
react-native-svgalongside the SDK