nuxt-community / sitemap-module

Sitemap Module for Nuxt 2
https://sitemap.nuxtjs.org
MIT License
685 stars 129 forks source link

[h3] [unhandled] next is not a function (Nuxt/Bridge - Nitro 6.0.0) #271

Open NtchPlayer opened 1 year ago

NtchPlayer commented 1 year ago

Hi, As @danielroe ask me, I open an issue for error [h3] [unhandled] next is not a function (https://github.com/nuxt/bridge/issues/592).

Environment

Reproduction https://codesandbox.io/s/nuxt-bridge-sitemap-module-bug-report-h3-6mhi80

-> go to sitemap at this url: https://6mhi80.sse.codesandbox.io/sitemap.xml to see the error 500.

Describe the bug

With this version of nuxt/bridge: 3.0.0-27778050.a725a7a, sitemap-module cause this error: [h3] [unhandled] next is not a function when you go the sitemap.xml on your browser.

This warning is also display by the console when the app is compile: WARN [h3] Implicit event handler conversion is deprecated. Use eventHandler() or fromNodeMiddleware() to define event handlers.

This error probably come from nitro 6.0.0, with the last update to unjs/h3.

lmssieh commented 1 year ago

I'm having the same issue, any quick fix for this?

NtchPlayer commented 1 year ago

Nop, I jus't find this repo, a version of this plugin for Nuxt 3 where this bug is corrected: sitemap-module-nuxt-3

ThomasBerne commented 1 year ago

Does anyone here have a solution for nuxt bridge? I can't transfer to nuxt 3 yet and I want to add a sitemap.xml generated by code.

robinscholz commented 1 year ago

Running into this problem as well. Would be great if someone has a workaround!

katerlouis commented 1 year ago

Same problem :'( although it seems to be with Nitro 1.0.0? I simply followed this guide to migrate to nuxt-bridge https://github.com/nuxt/bridge

image