-
Notifications
You must be signed in to change notification settings - Fork 33
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
i18next version 23.0.0 or higher includes breaking changes. #171
Comments
workaround: rm -rf node_modules && pnpm i --shamefully-hoist=true |
I am still getting the same error. |
You could try adding a rm -rf node_modules && pnpm install That worked for me. |
Thank you for the suggestion. Do I need to put anything inside the |
Yes, put the below in your
|
Thank you for the detail. |
@xerullian which versions of i18next and astro-i18next are you using? By experimenting with versions and reading changelog I found out that upgrading [email protected] (latest v22 release) to 23.0.0 leads to breaking latest astro-i18next (and probably all versions) when using pnpm (I haven't tested other managers tho) @aapl-yumi I also could not make all of them work together by configuring pnpm. You can delete |
@ZerdoX-x Thank you very much for your suggestion on downgrading. I was fiddling around with |
Please reopen |
I'm using the latest (v23.4.6) |
@calmonr because it's related to pnpm and how it's managing |
@aapl-yumi would you like to reopen issue? if not, i'll just reopen this issue in separate one |
Describe the bug
When using the HeadHrefLangs component with
import { HeadHrefLangs } from "astro-i18next/components";
, I get a type error: “Cannot read properties of undefined (reading 'map')” when runningnpm run dev
.However, there are no error thrown when using
npm run preview
.SUPPLEMENT:
As per #171 (comment), the main issue was with the use of version that is higher than 22.x.x, which included breaking changes. By using a version less than 23.0.0,
npm run dev
works as expected.To Reproduce
Steps to reproduce the behavior:
HeadHrefLangs
component and use it inpages/index.astro
npm run dev
localhost:3000
(or wherever the page is hosted locally)Expected behavior
No error to be thrown.
Screenshots
If applicable, add screenshots to help explain your problem.
Context (please complete the following information):
astro-i18next
version: 1.0.0-beta.21astro
version: 2.10.1The text was updated successfully, but these errors were encountered: