Skip to content

fix: add react-native-svg peer dependency instruction for React Native wizard#282

Closed
kopchikovich wants to merge 1 commit intoPostHog:mainfrom
kopchikovich:fix-rn-svg-peer-dep
Closed

fix: add react-native-svg peer dependency instruction for React Native wizard#282
kopchikovich wants to merge 1 commit intoPostHog:mainfrom
kopchikovich:fix-rn-svg-peer-dep

Conversation

@kopchikovich
Copy link

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-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" from "node_modules/posthog-react-native/dist/surveys/icons.js"

This adds an instruction to the React Native wizard agent context so the AI agent explicitly installs react-native-svg alongside the SDK

Simulator Screenshot - iPhone 17 Pro Max - 2026-02-21 at 09 05 31

…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.
@edwinyjlim edwinyjlim requested a review from a team March 4, 2026 21:44
Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true :)

@edwinyjlim
Copy link
Member

Incorporated your changes in an upstream repo that delivers context and instructions. Thank you!

PostHog/context-mill#94

@edwinyjlim edwinyjlim closed this Mar 4, 2026
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.

3 participants