Back to Nuxt

NUXT_E2004

docs/errors/e2004.md

4.5.2473 B
Original Source

E2004

A route middleware was referenced (usually via definePageMeta({ middleware: [...] })) but no middleware with that name exists. Common causes are a typo in the name, or a middleware file that was renamed or deleted without updating its references.

Resolution

Make sure the name matches a file in middleware/. Names are derived from the filename: middleware/auth.ts is referenced as auth.

::read-more{to="/docs/guide/directory-structure/middleware"} ::