TypeError: It looks like you forgot to wrap your Algolia search component

Hi, I’m following this example and getting this error:

TypeError: It looks like you forgot to wrap your Algolia search component 
"<ais-search-box>" inside of an "<ais-index>" component. You can also pass
a search store as a prop to your component.

My code is exactly the same, as shown in tutorial:

<div id="app">
    <ais-index app-id="MYAPPID" api-key="MYAPIKEY" index-name="MYINDEXNAME">
        <ais-search-box></ais-search-box>
        <ais-results></ais-results>
        <ais-pagination></ais-pagination>
    </ais-index>
</div>

All components are imported correctly.

What am I doing wrong? I use Vue 2.*

Hey there,

Vue.js introduced a breaking change in 4.2.x if i remember correctly.

Can you make sure you use the latest version of Vue and try again?

Let me know if it works, or please provide us with the exact version of the framework you are using so that we can investigate?

Your code looks fine :wink:

Speak soon,

Yeah, I’ve reinstalled the latest Vue.js (2.4.2), and everything works fine now.

Thanks for the help!

1 Like