Error when using gatsby-plugin-prismic-previews plugin

I am facing a rather annoying problem. I am doing preview function and I installed following this guide but when i run it i get this error

I really hope someone can help me

Hey there Jason, are you following this guide?

Which version of the preview and source plugin are you using?

yes mate, i following this guide. I'm using gatsby-source-prismic 4.1.6 and gatsby-plugin-prismic-previews 5.2.1

I see. When are you finding this error exactly? Could you give us steps to reproduce it?

I get this error when using preview

You can try and update your source plugin to the latest version: