localeSubpaths generate TypeError in force-trailing-slash.js
See original GitHub issueI just try to run the source example with localeSubpaths set to true
Here is my i18n.js (only change made)
const NextI18Next = require('next-i18next')
module.exports = new NextI18Next({
otherLanguages: ['de'],
localeSubpaths: true
})
And then, each page load result in lots of warning in the shell
TypeError: Cannot read property 'options' of undefined
at _default (...\node_modules\next-i18next\dist\utils\force-trailing-slash.js:15:12)
— (the full trace is too long and not really usefull) —
Page generation still work and translation are in place, but kinda worry about all those warnings about a missing i18n object
https://github.com/isaachinman/next-i18next/blob/master/src/utils/force-trailing-slash.js (line 5)
req.i18n.options.allLanguages.forEach((lng) => {
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
localeSubpaths generate TypeError in force-trailing-slash.js
I just try to run the source example with localeSubpaths set to true Here is my i18n.js (only change made) const NextI18Next =...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s not an additional problem, that’s the same problem. Fix coming shortly.
Basic e2e testing added with 08b0449.