Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev crashes hard on syntax error in front matter #2813

Open
KajKandler opened this issue Oct 15, 2024 · 0 comments
Open

npm run dev crashes hard on syntax error in front matter #2813

KajKandler opened this issue Oct 15, 2024 · 0 comments

Comments

@KajKandler
Copy link

KajKandler commented Oct 15, 2024

Environment


  • Operating System: Darwin
  • Node Version: v21.7.1
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Create a markdown file with front matter, and indent the front matter incorrectly

Describe the bug

When I have a syntax error in the front matter of a page, the run dev crashes and needs to be restarted

Additional context

Using NUXT/content and NUXTJS/seo

Logs

  12 |    - mainEntity:
  ---------^
  13 |      '@type': "Person"
  14 |      '@id': "https://coldframe.ent ...
  at generateError (node_modules/js-yaml/dist/js-yaml.mjs:1273:10)
  at throwError (node_modules/js-yaml/dist/js-yaml.mjs:1277:9)
  at readBlockSequence (node_modules/js-yaml/dist/js-yaml.mjs:2105:7)
  at composeNode (node_modules/js-yaml/dist/js-yaml.mjs:2530:12)
  at readBlockMapping (node_modules/js-yaml/dist/js-yaml.mjs:2254:11)
  at composeNode (node_modules/js-yaml/dist/js-yaml.mjs:2531:12)
  at readDocument (node_modules/js-yaml/dist/js-yaml.mjs:2715:3)
  at loadDocuments (node_modules/js-yaml/dist/js-yaml.mjs:2778:5)
  at Object.load$1 [as load] (node_modules/js-yaml/dist/js-yaml.mjs:2804:19)
  at parseFrontMatter (node_modules/remark-mdc/dist/index.mjs:46:21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant