Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.
This repository was archived by the owner on May 13, 2024. It is now read-only.

JavaScript error due to <meta> tag in template #78

@chriscdn

Description

@chriscdn
  • I confirm that this is an issue rather than a question.

Bug report

In this commit a <meta> tag is added to the page. This causes VuePress to throw an error since the updateMetaTags() function in updateMeta.js assumes (correctly) that all <meta> tags are below <head>.

Steps to reproduce

  • I prepared a reproduction repo, here is the reproduction repo:

  • This issue doesn't need a reproduction repro, here is the steps to reproduce

  • Download this repository as a ZIP file

  • upgrade all the dependencies (e.g., yarn upgrade --latest)

  • build (yarn example:build)

  • serve the output in example/.vuepress/dist/

  • inspect the page and notice the JavaScript error

What is expected?

No JavaScript error.

What is actually happening?

{"stack":"Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.\n at /assets/js/app.bff2e1e0.js:8:102722\n at Array.forEach ()\n at Xt (/assets/js/app.bff2e1e0.js:8:102687)\n at i.updateMeta (/assets/js/app.bff2e1e0.js:8:102369)\n at i.mounted (/assets/js/app.bff2e1e0.js:8:102204)\n at Bt (/assets/js/app.bff2e1e0.js:6:11294)\n at Qe (/assets/js/app.bff2e1e0.js:6:25252)\n at Object.insert (/assets/js/app.bff2e1e0.js:6:20274)\n at O (/assets/js/app.bff2e1e0.js:6:56250)\n at _n.patch (/assets/js/app.bff2e1e0.js:6:57204)"}
/assets/js/app.bff2e1e0.js:6

Other relevant information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions