You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the recent changes to i18n in 0.24.0 broke running with Bun. Version 0.23.4 works fine.
To reproduce:
npm create astro@latest -- --template starlight
cd<path-to-project>
bun install
bun run dev
bun run dev
$ astro dev
11:29:46 PM [vite] Error when evaluating SSR module /node_modules/@astrojs/starlight/utils/i18n.ts:
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
11:29:46 PM [vite] Error when evaluating SSR module /node_modules/@astrojs/starlight/integrations/shared/localeToLang.ts: failed to import "/node_modules/@astrojs/starlight/u
tils/i18n.ts"
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
11:29:46 PM [vite] Error when evaluating SSR module /node_modules/@astrojs/starlight/integrations/expressive-code/translations.ts: failed to import "/node_modules/@astrojs/st
arlight/integrations/shared/localeToLang.ts"
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
11:29:46 PM [vite] Error when evaluating SSR module /node_modules/@astrojs/starlight/integrations/expressive-code/index.ts: failed to import "/node_modules/@astrojs/starlight
/integrations/expressive-code/translations.ts"
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
11:29:46 PM [vite] Error when evaluating SSR module /node_modules/@astrojs/starlight/index.ts: failed to import "/node_modules/@astrojs/starlight/integrations/expressive-code
/index.ts"
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
11:29:46 PM [vite] Error when evaluating SSR module /home/xxx/docs/astro.config.mjs: failed to import "/node_modules/@astrojs/starlight/index.ts"
|- AstroUserError: Failed to get locale informations for the 'en' locale.
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at getLocaleInfo (:99:47)
at <anonymous> (:5:48)
at processTicksAndRejections (:12:39)
[astro] Unable to load your Astro config
[AstroUserError] Failed to get locale informations for the 'en' locale.
Hint:
Make sure to provide a valid BCP-47 tags (e.g. en, ar, or zh-CN).
Stack trace:
at new AstroUserError (/home/xxx/docs/node_modules/astro/dist/core/errors/errors.js:96:9)
at <anonymous> (:5:48)
error: script "dev" exited with code 1
Thanks for the issue @aaronmondal, seems like a duplicate of #1961. This is due to a missing part of the standard JavaScript Intl API in Bun. (Intl is not Node.js specific, but also available in web browsers for example.)
Given Bun is still in early development we are not targeting it for official support yet and I would consider this a bug in Bun rather than Starlight. I don't see an existing issue, so it might be helpful to open an issue over at https://github.com/oven-sh/bun/issues
What version of
starlight
are you using?0.24.0
What version of
astro
are you using?4.10.1
What package manager are you using?
bun (1.1.12)
What operating system are you using?
Linux
What browser are you using?
Chrome
Describe the Bug
It looks like the recent changes to
i18n
in0.24.0
broke running with Bun. Version0.23.4
works fine.To reproduce:
cc @HiDeoo @delucis
Link to Minimal Reproducible Example
Participation
The text was updated successfully, but these errors were encountered: