Adding Middleware Gives "TypeError: Cannot read properties of undefined" #67312
Unanswered
HimayRadec
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Everytime I add middleware to my authjs project it causes my web app to give the error whenever I try to load it
TypeError: Cannot read properties of undefined (reading
'User')
The link to the repo is here
https://github.com/HimayRadec/app.PumpStats/tree/Register/Login
Please make sure you are the Register/Login branch
The files I believe are linked to the error are the auth.js, middleware.ts, and UserModel.js
This is my middleware file
my auth.js file
my UserModel.js file
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions