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

New installation of starlight causing infinite loop #2733

Closed
1 task
pierskarsenbarg opened this issue Dec 20, 2024 · 3 comments
Closed
1 task

New installation of starlight causing infinite loop #2733

pierskarsenbarg opened this issue Dec 20, 2024 · 3 comments

Comments

@pierskarsenbarg
Copy link

What version of starlight are you using?

0.30.3

What version of astro are you using?

5.1.0

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

chrome

Describe the Bug

Brand new installation of astro with starlight:

npm create astro@latest -- --template starlight

Ran npm run dev and opened page in browser

Page didn't load but console showed this in an infinite loop:

ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
ShikiError: Language `(define name)` is not included in this bundle. You may want to load it from external source.
    at resolveLang (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1874:17)
    at file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1891:52
    at Array.map (<anonymous>)
    at createHighlighter (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1891:41)
    at getSingletonHighlighter (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1914:16)
    at codeToHtml (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1938:27)
    at getViteErrorPayload (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/astro/dist/core/errors/dev/vite.js:88:48)
    at Timeout._onTimeout (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/astro/dist/vite-plugin-astro-server/response.js:19:67)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
  Hint:
    Make sure your promises all have an `await` or a `.catch()` handler.
  Error reference:
    https://docs.astro.build/en/reference/errors/unhandled-rejection/
  Stack trace:
    at resolveLang (file:///Users/piers/go/src/github.com/pierskarsenbarg/astro-starlight-docker/node_modules/@shikijs/core/dist/index.mjs:1874:17)
    at Array.map (<anonymous>)
    [...] See full stack trace in the browser, or rerun with --verbose.

Link to Minimal Reproducible Example

https://github.com/pierskarsenbarg/astro-starlight-shiki-bug

Participation

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

HiDeoo commented Dec 20, 2024

Thanks for the report 🙌

This seems to be a duplicate of withastro/astro#12796 which indicates an upstream issue with esbuild. Looks like Vite already released a fix by pinning the esbuild version and a PR on Astro has been opened too to update to this version.

I suggest following the linked Astro issue to track progress in the meantime.

@HiDeoo HiDeoo closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
@pierskarsenbarg
Copy link
Author

@HiDeoo is this going to be the same for #2734 ?

For this issue (#2733) I'm not seeing the same ShikiError error on a new installation of Astro with the basic template (https://github.com/pierskarsenbarg/astro-new-template) hence why I created this issue here rather than the main astro repo

@pierskarsenbarg
Copy link
Author

Ignore that comment - I can see that the reporter of that issue said that the basic template was fine as well.

Thanks

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

2 participants