Cannot use 'in' operator to search for 'default' in undefined error when using Prismic Vue from the CDN

When I follow the instructions here:

and include this:

I receive this error:

!

And can't go any further. Any idea why that is?

1 Like

Hello Craig, welcome to the Prismic forum!

Could you tell me where exactly are you adding this script inside your project?

I add both of those script tags to the header. Do I also need to add something else? Is there another dependency?

Hey Craig, We are investigating the reason for this error, meanwhile, is this causing you trouble to display the data correctly?

You need to have these installed npm install @prismicio/vue prismic-javascript prismic-dom

Hey Craig,

Are you getting this error straight away when you include the script or are you trying to do queries as well?

Hey again @craig,

Paulina is testing our documentation for the starting with vue to see where the issue is and how we can resolve it.

In the meantime I always find it’s best to start with one of our example projects as they have everything configured and ready to go. Try out the blog example and let me know how it goes.

Thanks.

This issue has been closed due to inactivity.

Hello, Just an update about this error and the Vue docs.

We've updated the Vue documentation, its error doesn't appear with the new configuration :metal: