react-gh-pages icon indicating copy to clipboard operation
react-gh-pages copied to clipboard

"homepage" key in package.json does not work with react-i18next

Open Motion4Life opened this issue 3 years ago • 2 comments

When adding the homepage key inside the package.json while working with react-i18next, the whole app stops being translated.

To reproduce

"i18next": "^21.8.8",
"react": "^18.1.0",
"react-i18next": "^11.17.0",
"react-i18next": "^11.17.0",

i18n config

i18n
  .use(initReactI18next)
  .use(HttpApi)
  .init({
      fallbackLng: {
      default: ['en'],
     },
    debug: true,
   })

Motion4Life avatar Jun 04 '22 11:06 Motion4Life

Hi @Motion4Life, I am not familiar with the react-i18next package. You might try starting from "scratch" (i.e. no app), following the steps in the tutorial, deploying the app to GitHub Pages, then adding in the react-i18next package.

On a side note, I noticed in your post above, react-i18next is listed as a dependency twice. I have never tried listing a package twice in the package.json file. I don't know what the implications of doing that are.

Finally, you can format code in GitHub Issues using the syntax shown here.

gitname avatar Aug 31 '22 22:08 gitname

Finally, you can format code in GitHub Issues using the syntax shown here.

@Motion4Life, I was able to edit your post (I didn't know I could do that!) and add the backticks to format the code snippets.

gitname avatar Aug 31 '22 22:08 gitname

Closing because using react-i18next is out of scope of this tutorial. This issue will remain in the "Closed" issues tab for future reference (i.e. search results).

gitname avatar Jan 20 '23 17:01 gitname