Open JoepOomens opened 5 years ago
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. node_modules\vue-draggable-nested-tree\dist\vue-draggable-nested-tree.cjs.js line 509:1
if (!document.elementsFromPoint) {
document.elementsFromPoint = elementsFromPoint;
}
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 `
` index.vue ` export default { components: { DraggableTree: () => import('@/components/DraggableTree.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 1. NuxtServerError: render function or template not defined in component: DraggableTree 2. [Vue warn]: Failed to resolve async component: () => __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! @/components/DraggableTree.vue */ "./components/DraggableTree.vue")) Reason: ReferenceError: document is not definedexport default { components: { DraggableTree: () => import('vue-draggable-nested-tree').then(m => m.DraggableTree), } }
TypeError: Cannot read property '__esModule' of undefined
:(
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. try this https://he-tree-vue.phphe.com/
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?