Middleware function too heavy?
Unanswered
Spectacled Caiman posted this in #help-forum
Spectacled CaimanOP
When I try to deploy my code I get two errors. One being from the
https://sourceb.in/RoeRxYEDL9
./debug file form axios in the follow-redirect module but I think vercel ignores that. The error that stops my deployment says src/middleware is 3.08MB but your current plan allows a maximum file size of 1MB All I have is this code. I have no error in development but when I push to prduction I get this error. One more thing... The getUser function is a fetch request that sends an API call to my personal API to check if the user cookie and whatnot is valid.https://sourceb.in/RoeRxYEDL9
6 Replies
European sprat
Show getUser code
@European sprat Show getUser code
Spectacled CaimanOP
European sprat
Weird I'm not sure what's going on
Spectacled CaimanOP
Yeah it's pretty casual code idk why I'm getting the error
European sprat
I'd try removing everything except for a console.log and see what the size is. Try to narrow it down
@European sprat I'd try removing everything except for a console.log and see what the size is. Try to narrow it down
Spectacled CaimanOP
Are you talking about the getUser function or the middleware?