【发布时间】:2021-10-09 18:22:20
【问题描述】:
仍然在学习 JS,但我正在努力解决这个问题。
在 VS 代码调试环境中,一切正常,但是当我部署到 Netlify 时,某些路由仅在某些时候工作。例如,this route 以及其他 /interests 路由,或者 404,加载一个空白页面,或者偶尔可以正常工作。
这些页面背后的代码是here。 /posts、/tags 和 /wip 中的其他 nuxt-content 页面都可以正常工作。
我在开发环境中没有看到与此相关的错误。我还是 js 故障排除的新手,但是当我在 Chrome 中加载开发工具时,有时会看到错误“DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.”
我研究了该错误导致我发布了一些关于该主题的帖子:
- Nuxtjs issue
- Vuejs error on client side
- Hydration errors blog pos
- failed to execute 'appendChild' node
- full static mode dynamic pages payload 404 errors
我从那里尝试了各种解决方案,包括用 v-show 替换 v-if,清理 <p> 标签,以及在 <client-only> 中包装各种东西,但问题仍然存在。
有人知道我做错了什么吗?
【问题讨论】:
标签: javascript vue.js nuxt.js nuxt-content