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

Build failed when the project using TypeScript #10012

Closed
1 task
mj8327 opened this issue Feb 7, 2024 · 4 comments · Fixed by #10013
Closed
1 task

Build failed when the project using TypeScript #10012

mj8327 opened this issue Feb 7, 2024 · 4 comments · Fixed by #10013
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: content collections Related to the Content Collections feature (scope) pkg: astro Related to the core `astro` package (scope) regression

Comments

@mj8327
Copy link

mj8327 commented Feb 7, 2024

What version of starlight are you using?

0.17.3

What version of astro are you using?

4.2.1

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Reproduction:

  1. Using command pnpm create astro --template starlight to create new project, select Write TypeScript.
  2. Build using pnpm run build, then failed, error location is src/content/config.ts line 5
  3. Select JS has no build problem.

Sorry, I do not know how to create a starlight project using stackblitz, and how to run build command in it. So the project in it is a default astro basic project, just for submit the issue.

截屏2024-02-07 17 49 30 截屏2024-02-07 17 52 28

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-qrqqam?file=README.md&title=Astro%20Starter%20Kit:%20Basics

Participation

  • I am willing to submit a pull request for this issue.
@HiDeoo
Copy link
Member

HiDeoo commented Feb 7, 2024

Thanks for your report 🙌

I can repro the issue on my end with the latest version of Astro (v4.3.3). As a temporary workaround, rolling back to Astro v4.3.2 seems to fix the issue.

I did not yet have the time to investigate but by quickly looking at the changelog, #9906 seems to be the only related change.

@florian-lefebvre
Copy link
Member

Likely caused by my PR as you said. I wonder if this error is only in starlight (hence caused by Starlight importing some types that changed) or if it also happens in standard astro projects

@florian-lefebvre florian-lefebvre self-assigned this Feb 7, 2024
@delucis
Copy link
Member

delucis commented Feb 7, 2024

Thanks for the report @mj8327! I think this will need fixing upstream in astro so transferring this issue there.

@delucis delucis transferred this issue from withastro/starlight Feb 7, 2024
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 7, 2024
@delucis delucis added pkg: astro Related to the core `astro` package (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) feat: content collections Related to the Content Collections feature (scope) regression and removed needs triage Issue needs to be triaged labels Feb 7, 2024
@bomberstudios
Copy link

Thanks a lot for the quick fix. I was bitten by this today and it's nice to see a PR with a fix already 🧡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: content collections Related to the Content Collections feature (scope) pkg: astro Related to the core `astro` package (scope) regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants