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

astro-i18next type error on local builds #197

Open
clee231 opened this issue Jan 15, 2025 · 0 comments
Open

astro-i18next type error on local builds #197

clee231 opened this issue Jan 15, 2025 · 0 comments

Comments

@clee231
Copy link

clee231 commented Jan 15, 2025

I'm trying to build this project locally, however visiting the local dev server after running yarn start:build returns an error regarding the language selector.

23:59:13 [200] /en/ 83ms
23:59:13 [ERROR] Cannot read properties of undefined (reading 'map')
  Stack trace:
    at /home/clee231/works-on-woa/node_modules/astro-i18next/src/components/LanguageSelector.astro:26:19
    at AstroComponentInstance.init (/home/clee231/works-on-woa/node_modules/astro/dist/runtime/server/render/astro/instance.js:33:29)
    at Object.render (/home/clee231/works-on-woa/node_modules/astro/dist/runtime/server/render/component.js:343:22)

I've tried building this project using Node 20 and 21, but both return the same error.

It seems to be referring to this https://github.com/yassinedoghri/astro-i18next/blob/v1.0.0-beta.21/src/components/LanguageSelector.astro#L26, where i18next.languages seems to be not defined. Is there a configuration file that needs to be updated?

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

1 participant