question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extending Layout.vue can't resolve '@AlgoliaSearchBox'

See original GitHub issue
  • I confirm that this is an issue rather than a question.

Bug report

Version

1.0.0-alpha.47

Steps to reproduce

What is expected?

  1. Create a Layout that extends @vuepress/theme-default/layouts/Layout.vue
    CustomLayout.vue
<script>
import Layout from "@vuepress/theme-default/layouts/Layout.vue";

export default {
  extends: Layout
}
</script>
  1. Use Layout index.md
---
layout: CustomLayout
---

What is actually happening?

Can’t resolve @AlgoliaSearchBox

./docs/.vuepress/theme/components/Navbar.vue?vue&type=script&lang=js& (./node_modules/cache-loader/dist/cjs.js??ref--3-0!./node_modules/babel-loader/lib??ref--3-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./docs/.vuepress/theme/components/Navbar.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '@AlgoliaSearchBox' in '/vuepress/docs/.vuepress/theme/components'

I had the same problem with @Searchboxbut i fixed it with plugin @vuepress/plugin-search

Need to install a plugin for @AlgoliaSearchBox ?

Other relevant information

  • Your OS: MacOs Mojave
  • Node.js version: 8.9.4
  • Browser version: Chrome
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? Yes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
imaegoocommented, Sep 15, 2020

Change

import Layout from "@vuepress/theme-default/layouts/Layout.vue";

to

import Layout from "@parent-theme/layouts/Layout.vue";

Define parent theme in .vuepress/theme/index.js

module.exports = {
  extend: '@vuepress/theme-default'
}

Works for me.

0reactions
imaegoocommented, Sep 15, 2020

Same here. Was there a solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Vue InstantSearch - Algolia
This widget used to expose the search results only, you can now access the search parameters as well. This allows you to leverage...
Read more >
extending components #301 - algolia/vue-instantsearch - GitHub
Extending component is not working i just exactly as the docs, and seems like the extended component it's not accessing the results.
Read more >
How To Implement Search Functionality In Your Nuxt App ...
Algolia InstantSearch UI component/widget library for Vue. instantsearch.css. Custom styling for instantSearch widgets. algoliasearch. A HTTP ...
Read more >
Frequently asked questions — Vuetify
Vuetify is a Material Design component framework for Vue.js. ... are easily extendable by importing it and using the extends option in vue....
Read more >
Algolia Pro Frontend | Grav CMS
twig template, both necessary for the styling and inclusion of the rest of the template. The <ais-instant-search> widget is also tied to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found