Export 'createInstantSearch' was not found in 'vue-instantsearch'

Heloo guys, I have a problem regarding this error, when using Version 3.0.3. Currently I have no errors using version “vue-instantsearch”: “^2.7.0”, but I would like to upgrade to the newest version.

export 'createInstantSearch' was not found in 'vue-instantsearch'

My code is - does not work in the newest version

import algoliasearch from 'algoliasearch/lite';
import { history } from 'instantsearch.js/es/lib/routers'
import { simple } from 'instantsearch.js/es/lib/stateMappings'
import {
  AisInstantSearch,
  AisRefinementList,
  AisHits,
  AisHighlight,
  AisSearchBox,
  AisStats,
  AisPagination,
  createInstantSearch
} from 'vue-instantsearch';
export default ({ app }, inject) => {
    const searchClient = algoliasearch(
      'latency',
      '6be0576ff61c053d5f9a3225e2a90f76'
)

     const { instantsearch,  rootMixin } = createInstantSearch({
          searchClient,
          routing: {
            router: history(),
            stateMapping: simple()
          },
          indexName: 'instant_search'
        });

        inject('instantsearch', instantsearch)
}

Thans a lot

Hey @martiin.chalupa, the API for server side rendering has changed form createInstantSearch to createServerRootMixin. You can see the changelog here: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/vue/#ssr-server-side-rendering

1 Like

Thanks a lot. With the best regards Martin

1 Like