posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

This provider has already been initialized. You should only initialize it once at the root of your app.

Open whollacsek opened this issue 3 years ago • 2 comments

Hi I'm a first time user and I'm currently blocked as I got this error when following this guide https://posthog.com/tutorials/nextjs-supabase-signup-funnel

Same issue when trying to run the example project: https://github.com/PostHog/posthog-js/tree/master/playground/nextjs

Seems like you have a logic issue, this condition is always true: https://github.com/PostHog/posthog-js/blob/75b35c22df0381bfe9b46b60190de7c24233cca5/react/src/context/PostHogProvider.tsx#L34

posthog-js version 1.50.4

Is there a workaround?

whollacsek avatar Mar 08 '23 05:03 whollacsek

cc: @lharries

neilkakkar avatar Mar 10 '23 12:03 neilkakkar

Hi @whollacsek, that should be fixed here: https://github.com/PostHog/posthog-js/pull/566

Would you mind updating to 1.50.7?

lharries avatar Mar 10 '23 14:03 lharries