When using vue-pano with Nuxtjs, I encountered the error message: "window is undefined".
If I import it like this:
<script>
import Pano from 'vue-pano'
export default {
components: {
Pano
}
}
</script>
I then tried using a plugin:
import Vue from 'vue'
if (process.browser) {
Vue.component('Pano', require('vue-pano'))
}
However, I faced the following errors:
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This could be due to incorrect HTML markup such as nesting block-level elements inside
<p>
or missing<tbody>
. It's bailing hydration and performing a full client-side render.[Vue warn]: Unknown custom element:
<pano>
- did you register the component correctly? For recursive components, ensure you provide the "name" option.
Could someone please advise on how to correctly install vue-pano with nuxtjs?
Thank you!