Skip to content

eas integrations:posthog:connect installs deprecated posthog-react-native-session-replay package #4101

Description

@metehandemir

Build/Submit details page URL

No response

Summary

Title: eas integrations:posthog:connect installs deprecated posthog-react-native-session-replay package

Summary

The eas integrations:posthog:connect command currently installs the deprecated posthog-react-native-session-replay package.

According to the PostHog documentation, the plugin was renamed starting with posthog-react-native 4.47.0+:

@posthog/react-native-plugin (>= 2.0.1) is the renamed posthog-react-native-session-replay plugin. It was renamed in posthog-react-native 4.47.0+ and now also powers native error tracking. Projects using posthog-react-native versions earlier than 4.47.0 should continue using posthog-react-native-session-replay.

Current behavior

Running:

eas integrations:posthog:connect

installs:

posthog-react-native-session-replay

which is deprecated for current versions of posthog-react-native.

Expected behavior

The integration should detect the installed posthog-react-native version (or assume current versions by default) and install:

@posthog/react-native-plugin

instead of the deprecated package.

For projects using posthog-react-native versions earlier than 4.47.0, it could continue installing posthog-react-native-session-replay for backward compatibility.

Why this matters

The current behavior causes users following the Expo integration to end up with a deprecated package, while the official PostHog documentation recommends using @posthog/react-native-plugin for modern versions. This can lead to confusion and unnecessary migration work.

Additional context

PostHog documentation states that:

  • @posthog/react-native-plugin (>= 2.0.1) replaces posthog-react-native-session-replay.
  • The new package supports both Session Replay and native error tracking.
  • posthog-react-native-session-replay should only be used with posthog-react-native versions earlier than 4.47.0.

Managed or bare?

Managed

Environment

Environment Info

  expo-env-info 2.1.0 environment info:
    System:
      OS: macOS 26.5.2
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 26.5.0 - /opt/homebrew/bin/node
      Yarn: 1.22.22 - /opt/homebrew/bin/yarn
      npm: 11.17.0 - /opt/homebrew/bin/npm
      Watchman: 2026.07.20.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.17.0 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 25.5, iOS 26.5, macOS 26.5, tvOS 26.5, visionOS 26.5, watchOS 26.5
      Android SDK:
        Build Tools: 34.0.0
        System Images: android-35 | Google Play ARM 64 v8a
    IDEs:
      Android Studio: 2026.1 AI-261.25134.95.2612.15822958
      Xcode: 26.6/17F113 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~57.0.8 => 57.0.8 
      expo-router: ~57.0.8 => 57.0.8 
      expo-updates: ~57.0.10 => 57.0.10 
      react: 19.2.3 => 19.2.3 
      react-native: 0.86.0 => 0.86.0 
    npmGlobalPackages:
      eas-cli: 21.3.0
    Expo Workflow: managed

Expo Doctor Output

19/20 checks passed. 1 checks failed. Possible issues detected:
Use the --verbose flag to see more details about passed checks.

✖ Validate packages against React Native Directory package metadata
The following issues were found when validating your dependencies against React Native Directory:
  Unmaintained: posthog-react-native-session-replay
Advice:
Use libraries that are actively maintained and support the New Architecture. Find alternative libraries with https://reactnative.directory.
Add packages to expo.doctor.reactNativeDirectoryCheck.exclude in package.json to selectively skip validations, if the warning is not relevant.

1 check failed, indicating possible issues with the project.

Error output

No response

Reproducible demo or steps to reproduce from a blank project

const SESSION_REPLAY_PACKAGE = 'posthog-react-native-session-replay';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reviewIssue is ready to be reviewed by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions