#Next.js + next-i18next

5 messages · Page 1 of 1 (latest)

proud wharf
#

Has anyone been able to make Nextjs + next-i18next work in Storybook 7 ?

I'm getting the following errors when running yarn storybook ....
Module not found: Error: Can't resolve 'fs' in '/Users/taffo/Desktop/dinbox/admin-frontend/node_modules/next-i18next/dist/esm/config'

brave mango
#

@proud wharf I use Storybook with react-i18next which is on the client side feature complete. So I modified the config for the Storybook side to use all imports from react-i18next and only in NextJS I use the next-i18next config

proud wharf
#

@brave mango would you be able to share some code ? Would be much appreciated 🙏

brave mango
#

@proud wharf yes you can use that plugin. I don't have any public repo to share, but its mainly exactly the docs of the addon. You'd just use everywhere inside the application code import {useTranslation} from "react-i18next" instead of next-i18next - than you can share all components.