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

feat!: update viewer dev middleware to be compatible with h3@0.8 #545

Merged
merged 3 commits into from
Oct 19, 2022
Merged

feat!: update viewer dev middleware to be compatible with h3@0.8 #545

merged 3 commits into from
Oct 19, 2022

Conversation

DamianGlowala
Copy link
Contributor

PR addresses a breaking change introduced in h3@0.8, which yields a warning on the latest Nuxt edge:

image

src/module.ts Outdated Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
DamianGlowala and others added 2 commits October 17, 2022 11:39
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Daniel Roe <daniel@roe.dev>
src/module.ts Show resolved Hide resolved
@n4an
Copy link

n4an commented Oct 19, 2022

But what to do with that

Implicit event handler conversion is deprecated. Use eventHandler() or fromNodeMiddleware() to define event handlers.
Handler: function csrf (req, res, next) {

Copy link
Contributor

That is likely another middleware injected by a different module. You will need to find out which module is adding the 'csrf' middleware and raise an issue there.

@valh1996
Copy link

valh1996 commented Oct 9, 2023

Hi @danielroe

I have the same issue :

 WARN  [h3] Implicit event handler conversion is deprecated. Use eventHandler() or fromNodeMiddleware() to define event handlers.                                                          12:05:12
     Route: /_tailwind 
     Handler: (req, res) => viewerDevMiddleware(new H3Event(req, res))

Here is my config:

- Operating System: Darwin
- Node Version:     v20.8.0
- Nuxt Version:     2.17.2-28271541.6132947
- CLI Version:      3.8.4
- Nitro Version:    2.6.3
- Package Manager:  npm@10.1.0
- Builder:          webpack
- User Config:      bridge, head, css, plugins, components, buildModules, modules, build, axios, runtimeConfig, auth, toast, i18n, router, serverHandlers, devServerHandlers, devServer, typescript, nitro
- Runtime Modules:  @nuxtjs/axios@5.13.6, @nuxtjs/auth-next@5.0.0-1642083611.1785b0f, @nuxtjs/toast@3.3.1, @nuxtjs/i18n@7.3.1, portal-vue/nuxt, @nuxtjs/tailwindcss@6.8.0
- Build Modules:    (), @nuxt/postcss8@1.1.3, @nuxt/bridge@3.0.0-rc.1-28271265.8fa71e1

Is it normal?

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

Successfully merging this pull request may close these issues.

6 participants