【发布时间】:2020-09-19 07:41:00
【问题描述】:
尝试在移动视口上使用vuetify 运行我的nuxtjs 应用程序时发现此错误,但在桌面视口上一切运行良好。
本地机器上的错误image : error on local machine:
The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.
使用 ubuntu 和 nginx 运行我的 nuxtjs 应用程序的服务器上的错误 pm2 使用
yarn build 然后pm2 start yarn -- start
image : error on server
DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
这两个错误发生在同一个场景中。
当我在桌面视口上运行它时,然后切换到移动视口(无需重新加载页面)它运行良好。但是如果我在移动视口上重新加载它,就会发生这些错误。
不确定我应该分享哪个页面,因为这个错误发生在所有页面上,甚至在 nuxt+vuetify 默认主页上。
目前桌面视口上也会出现相同的错误,但通过将我的组件包装在<client-only></client-only> 中已修复,并且错误从桌面视口消失但仍出现在移动视口上。
【问题讨论】:
标签: javascript vue.js vuetify.js nuxt.js