withastro / starlight

🌟 Build beautiful, accessible, high-performance documentation websites with Astro
https://starlight.astro.build
MIT License
4.83k stars 522 forks source link

Fail to start dev server #84

Closed MoustaphaDev closed 1 year ago

MoustaphaDev commented 1 year ago

What version of starlight are you using?

0.0.11

What version of astro are you using?

2.5.4

What package manager are you using?

pnpm

What operating system are you using?

Ubuntu 22.04

What browser are you using?

Chrome

Describe the Bug

I followed the instructions provided in the starlight i18n docs to add French (fr) as a new language. However after making the necessary changes, I encountered an issue where the development server fails to start.

Here's the folder structure of the project, it's just the starter example + a new folder (fr):

├── astro.config.mjs
├── package.json
├── pnpm-lock.yaml
├── public
│   └── favicon.svg
├── README.md
├── src
│   ├── assets
│   │   └── example-image.jpg
│   ├── content
│   │   ├── config.ts
│   │   └── docs
│   │       ├── en
│   │       │   ├── guides
│   │       │   │   └── example.md
│   │       │   ├── index.md
│   │       │   └── reference
│   │       │       └── example.md
│   │       └── fr
│   │           ├── guides
│   │           │   └── example.md
│   │           ├── index.md
│   │           └── reference
│   │               └── example.md
│   └── env.d.ts

I checked out the rest of the docs page, but it looks like those steps aren't really necessary because they use the wording "you can," which makes them optional I guess.

Based on the stack trace, it seems like the error originates from the starlight integration. If it turns out to be a user mistake, we could probably improve the error message to provide more helpful information.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-b5ued1

Participation

TheOtterlord commented 1 year ago

title is meant to be a required. Adding it to the config seems to fix it (see fork)

MoustaphaDev commented 1 year ago

Ah ok, that makes sense now. Thanks for the clarification! (should've just properly read the zod error 😅)