-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document is not defined with Nuxt.js #82
Comments
disable it in ssr |
I disabled it already using that no-ssr tag, right? Or is there another way I don't know? |
I need error detail |
The errorpage mentiones the following: ReferenceError: document is not defined.
|
I didn't looked into it, but now I did. I have now the following code (as mentioned in the link you sent): DraggableTree.vue <script> import { DraggableTree } from 'vue-draggable-nested-tree'; export default { components: { // eslint-disable-next-line vue/no-unused-components DraggableTree, }, mounted() { // exists only on client: console.log(DraggableTree); }, }; </script>` index.vue Now I get the following two errors, the first one in the browser and the second one in the terminal of the "npm run dev" script
|
export default { components: { DraggableTree: () => import('vue-draggable-nested-tree').then(m => m.DraggableTree), } } |
|
not clear |
use nuxt plugin to set it as a globle component will solve the problem. |
Thank you for your use. I published he-tree-vue. vue-draggable-nested-tree will no longer be updated. |
When I use the Tree component in Nuxt.js, I get the 'document is not defined' error when opening the page. I guess it has to do with the SSR in Nuxt, but the error still exists with the tag.
Has somebody solved this issue?
The text was updated successfully, but these errors were encountered: