【问题标题】:Failed to execute 'appendChild' on 'Node': This node type does not support this method在 'Node' 上执行 'appendChild' 失败:此节点类型不支持此方法
【发布时间】:2020-09-07 09:12:56
【问题描述】:

每次我在 Vercel 上构建时,它都会在页面加载时给我这个错误。

"Failed to execute 'appendChild' on 'Node': This node type does not support this method"

谁能帮我解决这个问题? Tt 在 netlify 上运行良好,但在 vercel 上运行良好。

它给了我使用“v-html”页面的错误

但它是一个标准的 vue 指令。

这是我如何使用 v-html 的示例:

    <div 
        v-if=" frontpage && frontpage.htmlText != null" 
        class="row container-wrap">
          <div
             class="seo-container col-lg-6"
             @click="openSeo"
             :class="{ 'is-open': seoOpen }">
                        <div
                            class="seo-container__content"
                            v-html="frontpage.htmlText"
                        />
          </div>
   </div>
```

【问题讨论】:

    标签: javascript vue.js nuxt.js vercel


    【解决方案1】:

    尝试用非自闭标签替换你最后一个嵌套的“div”:

    <div class="seo-container__content" v-html="frontpage.htmlText"></div>
    

    “Div”是一个非空的 HTML 元素,应该有一个结束标签。

    【讨论】:

      猜你喜欢
      • 2021-11-29
      • 2020-09-19
      • 1970-01-01
      • 1970-01-01
      • 2019-04-29
      • 2015-01-20
      • 2016-06-11
      • 1970-01-01
      • 2020-09-05
      相关资源
      最近更新 更多