react-i18next icon indicating copy to clipboard operation
react-i18next copied to clipboard

Module not found: Can't resolve 'i18next' in

Open gnusiva opened this issue 6 years ago • 11 comments

i just followed your documentation and i am getting this error.

Module not found: Can't resolve 'i18next' in

gnusiva avatar Sep 28 '20 16:09 gnusiva

Have you installed i18next?

npm i i18next

adrai avatar Sep 28 '20 16:09 adrai

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

gnusiva avatar Sep 28 '20 17:09 gnusiva

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

gnusiva avatar Sep 28 '20 17:09 gnusiva

just fixed the documentation there... thx

adrai avatar Sep 28 '20 17:09 adrai

import "i18next"; not import './i18n';

Removed relative import according to the documentation.

gorbatkoff avatar Feb 14 '23 09:02 gorbatkoff

Still not working. Can we have a WORKING sample: Just 2 button and a text?

Mazraatek avatar Apr 12 '23 09:04 Mazraatek

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.

adrai avatar Apr 12 '23 09:04 adrai

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.

Mazraatek avatar Apr 12 '23 09:04 Mazraatek

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.

Mazraatek avatar Apr 12 '23 09:04 Mazraatek

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.

adrai avatar Apr 12 '23 09:04 adrai

@Mazraatek Are you in the root folder? I got a similar error when the folder opened was not really the root project folder.

MervelMath avatar Apr 12 '23 19:04 MervelMath