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

sitemap conflicts with latest nuxt-i18n #157

Closed
miteyema opened this issue Sep 8, 2020 · 5 comments
Closed

sitemap conflicts with latest nuxt-i18n #157

miteyema opened this issue Sep 8, 2020 · 5 comments

Comments

@miteyema
Copy link
Contributor

miteyema commented Sep 8, 2020

Version

2.4.0

Reproduction link

https://github.com/miteyema/nuxt-i18n-demo

Steps to reproduce

What is expected ?

nuxt app builds successfully

What is actually happening?

nuxt app fails to build

Additional comments?

 ERROR  router.forEach is not a function                                                                                                          

  at flattenStaticRoutes (node_modules/@nuxtjs/sitemap/lib/routes.js:38:10)
  at getStaticRoutes (node_modules/@nuxtjs/sitemap/lib/routes.js:26:10)
  at Object.<anonymous> (node_modules/@nuxtjs/sitemap/lib/module.js:31:32)
  at Object.extendRoutes (node_modules/@nuxt/utils/dist/utils.js:1868:25)
  at Builder.resolveRoutes (node_modules/@nuxt/builder/dist/builder.js:5881:56)
  at async Promise.all (index 1)
  at async Builder.generateRoutesAndFiles (node_modules/@nuxt/builder/dist/builder.js:5710:5)
  at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:5635:5)
  at async Object._buildDev (node_modules/@nuxt/cli/dist/cli-dev.js:106:5)
  at async Object.startDev (node_modules/@nuxt/cli/dist/cli-dev.js:64:7)
  at async Object.run (node_modules/@nuxt/cli/dist/cli-dev.js:51:5)
  at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:2810:7)
This bug report is available on Nuxt community (#c115)
@rchl
Copy link
Member

rchl commented Sep 8, 2020

Should be fixed in nuxt-i18n (nuxt-modules/i18n@c0d136b)
Apparently Nuxt doesn't support async functions for extendBuild. Or it does if there is only a single module using extendBuild...

@NicoPennec
Copy link
Member

thanks @rchl for your quick fix 🙏

@miteyema can you confirm that the issue for the sitemap module is solved?

@pi0
Copy link
Member

pi0 commented Sep 8, 2020

Apparently Nuxt doesn't support async functions for extendBuild. Or it does if there is only a single module using extendBuild...

@rchl Do you mind making a bug report on nuxt for this?

@rchl
Copy link
Member

rchl commented Sep 9, 2020

@pi0 Filed nuxt/nuxt#8037

@miteyema
Copy link
Contributor Author

miteyema commented Sep 9, 2020

@NicoPennec With the bug fix update of @pi0 , all seems to work again. Thanks again for the very fast solution guys!

@miteyema miteyema closed this as completed Sep 9, 2020
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

4 participants