Auto Importing Issue
I'm trying to make a basic middleware and I'm facing an auto import issue. It doesn't recognize these functions and I cannot run my website. Thank you in advance!
6 Replies
How do I implement my code with this, exactly?
In the Nuxt docs for the middleware section, all the functions work
I'm wondering what is the issue, is it with my IDE or my imports?
Thre’s two types
- client: middleware method that runs before a pages navigation - https://nuxt.com/docs/guide/directory-structure/middleware
- server: middleware method that runs before a server route - https://nuxt.com/docs/guide/directory-structure/server#server-middleware
your first screenshot is for the server route, since it shows in your server folder
your second doc link is for the pages route.
what are you trying to do?
Ohhhh, so that was the problem the whole time, yeah I was trying to do the client middleware, I didn't even realize i put it in the wrong folder and read the wrong docs, thank you!