[Bug Report] Breaks when you have extendRoutes defined
See original GitHub issueFirst of all great plugin! I found a bug when you define extendRoutes (https://nuxtjs.org/api/configuration-router/#extendroutes) the Nuxt app breaks because of the module. The error it returns in the terminal is as follow:
TypeError: Cannot read property 'replace' of undefined
- routes.js:42 locales.forEach
[secrid-nuxt]/[nuxt-i18n]/lib/routes.js:42:40
- Array.forEach
- routes.js:39 localizedRoutes.forEach.baseRoute
[secrid-nuxt]/[nuxt-i18n]/lib/routes.js:39:13
- Array.forEach
- routes.js:38 generateRoutes
[secrid-nuxt]/[nuxt-i18n]/lib/routes.js:38:19
- module.js:23 Object.extendRoutes
[secrid-nuxt]/[nuxt-i18n]/lib/module.js:23:23
- utils.js:119 Object.extendRoutes
[secrid-nuxt]/[nuxt]/lib/common/utils.js:119:23
- builder.js:347 Builder.generateRoutesAndFiles
[secrid-nuxt]/[nuxt]/lib/builder/builder.js:347:50
I created a gist with my Nuxt config: https://gist.github.com/martinrisseeuw/e1ffea12757710c4ff94ef1d95f5cf4b
Do you maybe have a solution or workaround that I can use the module?
<div align="right">This question is available on Nuxt.js community (#c25)</div>Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
[Bug Report] Breaks when you have extendRoutes defined #52
First of all great plugin! I found a bug when you define extendRoutes (https://nuxtjs.org/api/configuration-router/#extendroutes) the Nuxt ...
Read more >Nuxt Import library to use within extendRoutes - Stack Overflow
I 've added a middleware/extendRouter.ts script, and added this to ... The middleware doesn't have the same issue with importing scripts.
Read more >Release Notes - Nuxt.js
Nuxt.js now detects when you created a store/ directory and will reload ... Our contributors submitting bug reports, feature requests and commenting on ......
Read more >BUG REPORT: OSPF Hello Timer on Point-to-Multipoint
It automatically sets the hello-interval to 30 seconds, overruling whatever value is entered for the ip ospf hello-interval. To set the hello-interval back...
Read more >Hawaii Pedestrian Toolbox
This report was funded in part through a grant from the Federal Highway. Administration, US Department of Transportation. The views and opinions of...
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 FreeTop 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
Top GitHub Comments
@paulgv I have updated the library to 4.0.1 because I wanted to have the custom routes functionality within page components. Unfortunately it looks like that this fix is broken? It seems that extendRoutes in my nuxt.config are ignored. Have you experienced this issue before and have a solution for it? If not I can go back to v2.9.1 and add the routing in the module settings.
@paulgv Great it works. Thanks a lot!