i18next-fluent
i18next-fluent copied to clipboard
react-fluent example throws error when project is ran locally
🐛 Bug Report
react-fluent example does not run due to error thrown by js2ftl
.
To Reproduce
- Clone the
react-i18next
repo -
cd example/v9.x.x/react-fluent
-
npm ci
-
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
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.