Module not found: Can't resolve 'i18next' in
i just followed your documentation and i am getting this error.
Module not found: Can't resolve 'i18next' in
Have you installed i18next?
npm i i18next
hi adrai,
yes it is working after i installed i18next
please update your below documentation page, it is showing only to install react-i18next https://react.i18next.com/getting-started
but under quick-start page, you have it documented properly. https://react.i18next.com/guides/quick-start
for others facing similar issue, please install all the modules mentioned in i18n.js file
npm i i18next i18next-http-backend i18next-browser-languagedetector react-i18next --save
just fixed the documentation there... thx
import "i18next"; not import './i18n';
Removed relative import according to the documentation.
Still not working. Can we have a WORKING sample: Just 2 button and a text?
Still not working. Can we have a WORKING sample: Just 2 button and a text?
https://github.com/i18next/react-i18next/tree/master/example/react
@Mazraatek please provide a minimal reproducible example showing that it's not working.
I'm a "stupid" newbie dev in React JS that tried ALL possible alternatives, including the one in the link, to install and use i18n / i18next. But I could even find a step-by-step guide for dummy to make it work.
Just as soon as I try: npm install react-i18next i18next --save It gives me:
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! peer react@"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" from @react-aria/[email protected] npm ERR! node_modules/@react-aria/ssr npm ERR! @react-aria/ssr@"^3.2.0" from @restart/[email protected] npm ERR! node_modules/@restart/ui npm ERR! @restart/ui@"^1.3.1" from [email protected] npm ERR! node_modules/react-bootstrap npm ERR! react-bootstrap@"^2.4.0" from the root project npm ERR! peer react@">=16.8.0" from @restart/[email protected] npm ERR! node_modules/@restart/hooks npm ERR! @restart/hooks@"^0.4.7" from @restart/[email protected] npm ERR! node_modules/@restart/ui npm ERR! @restart/ui@"^1.3.1" from [email protected] npm ERR! node_modules/react-bootstrap npm ERR! react-bootstrap@"^2.4.0" from the root project npm ERR! @restart/hooks@"^0.4.6" from [email protected] npm ERR! node_modules/react-bootstrap npm ERR! react-bootstrap@"^2.4.0" from the root project npm ERR! 18 more (@restart/ui, formik, prop-types-extra, qrcode.react, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.2 || ^18.0.0-0" from [email protected] npm ERR! node_modules/next npm ERR! next@"^12.2.1" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/react npm ERR! peer react@"^17.0.2 || ^18.0.0-0" from [email protected] npm ERR! node_modules/next npm ERR! next@"^12.2.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
https://locize.com/blog/react-i18next/
But then please first learn the basics of react.... And do not pollute this issue but maybe ask at Stackoverflow, sorry.
@Mazraatek Are you in the root folder? I got a similar error when the folder opened was not really the root project folder.