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

The library broke on Next >=13.4.5 #22

Open
NRech opened this issue Jun 28, 2023 · 4 comments
Open

The library broke on Next >=13.4.5 #22

NRech opened this issue Jun 28, 2023 · 4 comments

Comments

@NRech
Copy link

NRech commented Jun 28, 2023

Hello! How are you?
First, thank you so much for your awesome library and work! It's by far my favorite to use!

Unfortunately, after I updated to Next >=13.4.5, the library stopped working when I build my website. In development, it works as usual, but when I try to build, nothing works. I tried everything I could think, without any success.

I don't know if it's still being maintained, if it is, can you look into it, please?

Again, thank you for your work! Big hug!

@StarpTech
Copy link
Owner

Hi @NRech, thank you. Could you elaborate a bit more on what is not working and what error message you got? You can create a PR with the fix and I'd be happy to assist you.

@NRech
Copy link
Author

NRech commented Jun 28, 2023

Heya! Thanks for answering!

That's the weird thing, it doesn't give any error message. At first I debugged the line inside "getStaticProps":

const { default: lngDict = {} } = await import(../locales/${locale}.json);

the lngDict was always an empty object, so I loaded it directly into a var and converted to a string, and it arrived ok at the "_app.js" "pageProps".
Then i just passed to the component as usual:

<I18nProvider lngDict={lngDict} locale={router.locale}>

But the "i18n.t" method doesn't return anything anymore. No error, it just returns nothing. And only during the build process. While in development, it works as it should.

I'm out of time this week, but I'll try to look more into it as soon as I can. For now, I'm using [email protected].

@lachlanjc
Copy link

Running into this issue as well! The locale copy is getting loaded fine, but rendering empty strings on pages.

@StarpTech
Copy link
Owner

Feel free to create a PR!

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

3 participants