question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

front matter validation does not print a good error message

See original GitHub issue

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I’m using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

ValidationError: "title" must be a string

without context, I don’t know where to look at

https://github.com/wenerme/wener/actions/runs/3286799524/jobs/5415286638

Reproducible demo

No response

Steps to reproduce

git clone git@github.com:wenerme/wener.git
cd wener/site

pnpm install
make build

Expected behavior

Works as before

Actual behavior

[ERROR] The following front matter:
---
title: null
---
contains invalid values for field(s): `title`.

- "title" must be a string

[ERROR] Loading of version failed for version current
[ERROR] Unable to build website for locale en.
[ERROR] ValidationError: "title" must be a string

Your environment

Self-service

  • I’d be willing to fix this bug myself.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wenermecommented, Oct 21, 2022

I don’t know is this related or not, but the katex error is also masked

https://github.com/wenerme/wener/actions/runs/3296716113/jobs/5436697247

Error: Cannot handle unknown node `inlineMath`

Have no idea which file(maybe this https://github.com/wenerme/wener/blob/master/notes/algorithm/ml/cs221-reflex.md), which line cause the error.

EDIT

cause is founded but the problem is missing file context

1reaction
slorbercommented, Oct 21, 2022

@shermanhui as mentioned above, if you want to contribute you can directly open a PR. If I have to spend time explaining things to you, it will be faster for me to solve the bug myself. Error Cause is a standard EcmaScript feature, you will find everything on Google or in the spec

@shanpriyan opened a PR already so it is too late now for this issue, but you can open a PR to another one if you want

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write Good Error Messages - UX Planet
Be concise and write a short description that is meaningful for user and gives him a clear idea of the problem and how...
Read more >
Joi validation error does not provide detailed ... - GitHub
When Joi validation fails, I expect the server response to contain message and validation properties with detailed error information. What was ...
Read more >
Designing Better Error Messages UX - Smashing Magazine
Let's explore when error messages should live above input fields and why toast error messages are usually not a very good idea.
Read more >
Displaying Error Messages with Thymeleaf in Spring - Baeldung
In this tutorial, we'll see how to display error messages originating from a Spring-based back-end application in Thymeleaf templates.
Read more >
Jekyll YAML front matter validator - Runar Ovesen Hjerpbakk
A simple script that validates Jekyll YAML front matter according to specific rules verifying that a Jekyll blog will build correctly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found