question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no exported member 'reactI18nextModule'

See original GitHub issue
Failed to compile.

./src/i18n.ts
(5,10): error TS2305: Module '"/Users/Dawson/code/xyz/node_modules/@types/react-i18next/index"' has no exported member 'reactI18nextModule'.

We are using TypeScript so perhaps this is an issue with the @types/react-i18next module instead

// i18n.ts
import * as i18n from 'i18next';
import * as Backend from 'i18next-xhr-backend';
import * as LanguageDetector from 'i18next-browser-languagedetector';

// ERROR HERE
import { reactI18nextModule } from 'react-i18next';

i18n
  .use(Backend)
  .use(LanguageDetector)
  .use(reactI18nextModule)
  .init({
    fallbackLng: 'en',

    // have a common namespace used around the full app
    ns: ['translations'],
    defaultNS: 'translations',

    debug: true,

    interpolation: {
      escapeValue: false, // not needed for react!!
    },

    react: {
      wait: true,
    },
  });

export default i18n;

Here are the following package versions we’re using:

    "i18next": "^10.0.6",
    "i18next-browser-languagedetector": "^2.0.0",
    "i18next-xhr-backend": "^1.4.3",
    "react-i18next": "^6.0.6",

    "@types/i18next": "^8.4.2",
    "@types/i18next-browser-languagedetector": "^2.0.0",
    "@types/i18next-xhr-backend": "^1.4.0",
    "@types/react-i18next": "^4.6.0",

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jamuhlcommented, Oct 31, 2017

ok…at least it works…hopefully someone will update those definitions soon…closing for now.

1reaction
dawsbotcommented, Oct 30, 2017

@jamuhl Worked on this for about 20 minutes and decided I don’t understand the complexities of this new named export enough to patch it in the typing source. Renamed my .ts to a .js and am ignoring the decrease in typing coverage. Working just fine for now 👌 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

v10 I18nextProvider typings missing · Issue #718 - GitHub
Module '"node_modules/react-i18next/src"' has no exported member ... I saw that reactI18nextModule became initReactI18next.
Read more >
Attempted import error: 'initReactI18next' is not exported from ...
This is my i18next.js file. I have downloaded all the dependencies and I was wondering why I am getting this error: Attempted import...
Read more >
withNamespaces (v9) - react-i18next documentation
export default withNamespaces((props) => props.namespaces)(TranslatableView);. If not using the reactI18nextModule this hoc should be nested inside a ...
Read more >
Module '"react"' has no exported member 'useDeferredValue'.
Module '"react"' has no exported member 'useDeferredValue'. For some reason, I can't seem to use React 18 features in my react application?
Read more >
react-i18next | Yarn - Package Manager
... not supported in Trans and Interpolate component anyway); setting i18n instance and defaults can now be done by i18next.use(reactI18nextModule) making ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found