You must use PlasmicRootProvider at the root of your app

Hi I’ve moved my <PlasmicRootProvider> up to _app.tsx as suggested here under “Using Plasmic Components in _app”, everything is working fine, however I’m getting this error in terminal over and over:
Plasmic: Encountered error while prepass rendering: Error: You must use <PlasmicRootProvider/> at the root of your app

Hey @efficient_pelican! You need to make sure you still have the <PlasmicRootProvider> in the extractPlasmicQueryData function

// Cache the necessary data fetched for the page
  const queryCache = await extractPlasmicQueryData(
    <PlasmicRootProvider loader={PLASMIC} prefetchedData={plasmicData}>
      <PlasmicComponent component={plasmicData.entryCompMetas[0].displayName} />
    </PlasmicRootProvider>
  );

oh! good to know. double providers :rainbow: :rainbow:

1 Like

This provider is used to fetch all the data needed for your page on the server-side.
https://docs.plasmic.app/learn/data-code-components/ Let me know if this helps.