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

Error i18next-fs-backend #1

Open
robin-gustafsson opened this issue Nov 14, 2022 · 2 comments
Open

Error i18next-fs-backend #1

robin-gustafsson opened this issue Nov 14, 2022 · 2 comments

Comments

@robin-gustafsson
Copy link

Hi, tried you solution but got this error on build. Any thoughts?

Using node version ^16

Failed to compile.

./node_modules/i18next-fs-backend/esm/readFile.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Used by readFileSync, readFile
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation

Import trace for requested module:
./node_modules/i18next-fs-backend/esm/readFile.js
./node_modules/i18next-fs-backend/esm/index.js
./i18n/index.ts
Build failed because of webpack errors

Skärmavbild 2022-11-14 kl  13 29 40

@aldabil21
Copy link
Owner

Hi

yeah this would happen if you try to use the t or any i18n functions in a client component. If you have use client in the component or a parent component, you will face this error.

I wouldn't call this repo as "solution", consider it just fiddling around trying Next 13 with i18n. The real solution should come from Next team here, vercel/next.js#41980

@robin-gustafsson
Copy link
Author

Thanks! Sorry I missed that part. I've tried your solution with Storyblok and it works well in the dev environment.

Looking forward to find a way to get i18n working with Next 13 Server components.

nextjs13-i18n-storyblok

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