Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-fluent example throws error when project is ran locally #8

Open
akdetrick opened this issue Jun 21, 2022 · 1 comment
Open

react-fluent example throws error when project is ran locally #8

akdetrick opened this issue Jun 21, 2022 · 1 comment

Comments

@akdetrick
Copy link

🐛 Bug Report

react-fluent example does not run due to error thrown by js2ftl.

To Reproduce

  1. Clone the react-i18next repo
  2. cd example/v9.x.x/react-fluent
  3. npm ci
  4. npm run start
js2ftl.js:24 Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at js2ftl (js2ftl.js:24:1)
    at BundleStore.createBundle (index.js:174:1)
    at BundleStore.createBundleFromI18next (index.js:182:1)
    at index.js:202:1
    at Array.forEach (<anonymous>)
    at index.js:201:1
    at Array.forEach (<anonymous>)
    at index.js:200:1
    at EventEmitter.js:53:1
    at Array.forEach (<anonymous>)
    at I18n.emit (EventEmitter.js:52:1)
    at i18next.js:203:1
    at done (i18next.js:308:1)
    at Object.callback (i18next.js:322:1)
    at BackendConnector.js:223:1
    at Array.forEach (<anonymous>)
    at Connector.loaded (BackendConnector.js:202:1)
    at BackendConnector.js:315:1
    at BackendConnector.js:256:1
    at index.js:133:1
    at XMLHttpRequest.x.onreadystatechange (ajax.js:92:1)

Your Environment

  • runtime version: node v16.13, npm v8.1
  • i18next version: v11.17.2
  • os: osx
@akdetrick
Copy link
Author

Looks like updating deps in package.json actually resolves the issue:

-    "i18next-fluent": "0.0.3",
-    "i18next-fluent-backend": "0.0.2",
+    "i18next-fluent": "^2",
+    "i18next-fluent-backend": "^0.0.3",

Will submit a PR to close this issue tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant