Skip to content

Add better dev logging when @statsig/react-bindings version doesn't match @statsig/next version #41

@sdemjanenko

Description

@sdemjanenko

I ran into an issue where I had @statsig/react-bindings:3.31.1 installed and i added @statsig/next:3.31.2. This resulted in a subdependency of @statsig/react-bindings:3.31.2 getting installed. This seems to have led to a second statsig context getting created (i use PNPM) and as a result I saw [Statsig] Attempting to retrieve a StatsigClient but none was set.

My fix was to update my direct dependency to @statsig/react-bindings:3.31.2 and I set an overrides (pnpm feature) of "@statsig/react-bindings": "$@statsig/react-bindings",

It would have saved me time if a warning in dev got printed when 2 instances of statsig context were loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions