Next.js Discord

Discord Forum

TypeError: e is Undefined in live production build

Answered
Saint Hubert Jura Hound posted this in #help-forum
Open in Discord
Saint Hubert Jura HoundOP
Hey, im encountering the above error in a live production build upon visiting the home page.
Depending on the browser the message Cannot destructure property 'auth' of 'e' as it is undefined can also appear
I found this issue through one of the posts here (https://nextjs-forum.com/post/1185634336163254335#message-1185634336163254335) which seems to be exactly whats happening to me:
https://github.com/wpengine/faustjs/issues/361
Also only happening on deployed production build, not in localhost
The fix here was making sure the href isnt null or undefined but im 99% sure thats not happening in my case, will add a default value to all link hrefs through and see if it helps
The stack trace personally doesnt tell me much but i added it in the ss.
Answered by Saint Hubert Jura Hound
Adding default values worked.. not sure where the undefined link was but guess ill find out soon. Weird that this only happens on live production build though..
View full answer

1 Reply

Saint Hubert Jura HoundOP
Adding default values worked.. not sure where the undefined link was but guess ill find out soon. Weird that this only happens on live production build though..
Answer