Skip to content

feat!: update viewer dev middleware to be compatible with [email protected] #545

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

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Conversation

DamianGlowala
Copy link
Contributor

PR addresses a breaking change introduced in [email protected], which yields a warning on the latest Nuxt edge:

image

DamianGlowala and others added 2 commits October 17, 2022 11:39
Co-authored-by: Daniel Roe <[email protected]>
Co-authored-by: Daniel Roe <[email protected]>
@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:  [email protected]
- 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/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], portal-vue/nuxt, @nuxtjs/[email protected]
- Build Modules:    (), @nuxt/[email protected], @nuxt/[email protected]

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