ContentfulFetcher throwing undefined/null error on localhost

Guys, when I’m using ContentfulFetcher component from the component store in Plasmic studio, the localhost:3000 gives this error, any ideas how to fix this?

Project ID is sHYXhWgTjKzvMrCqNXeZxc if needed (only an empty contentfulFetcher on canvas)

Hi! Are you using this with plasmic loader or codegen?


it is missing Contentful credentials. Could you try wrapping your app root in <GlobalContextsProvider/>? It should be exported from PlasmicGlobalCotnextsProvider.tsx, one of the generated files.

Thanks I’ll try that now, and is there a chance for this wrapper to be integrated in the Fetcher component itself on future updates?

It works! But I got this error instead, and the page design is okay when doing a force refresh (⌘⇧R) but with no real data being fetched from Contentful, and on regular reload it run into this hydration error

And it is not fetching the data

Are you using extractPlasmicQueryData() in your getStaticProps()? Be sure GlobalContextsProvider is also included in the React tree you are passing into extractPlasmicQueryData()