DEV Community

Discussion on: 😱 Static HTML Export with i18n compatibility in Next.js 😱

Collapse
 
karrtopelka profile image
Max Plotitsyn

Made everything like in a tutorial, but now, when I try to run in development mode (also for build) I got this error:
error - ./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:78:0
Module not found: Can't resolve 'fs'
Can you help please how to resolve this issue

Collapse
 
adrai profile image
Adriano Raiano

This seems to work: github.com/adrai/next-language-det...

provide a reproducible example and open a github issue

Collapse
 
filiplusnia profile image
Filip LuÅ›nia • Edited

I'm not sure about what causes the "fs" issue but it seems related to using getStaticProps in client components - move it to server component and pass the translation to the component which causes the error