Vida Zing
TTCTheo's Typesafe Cult
•Created by Vida Zing on 10/12/2024 in #questions
UploadButton Error: Cannot read properties of undefined (reading 'match')
If anyone else follows the tutorial, there is a bug in next 14.2 versus the 14.1 this video was made from that prevents redirect('/') from closing your modal dialogs. Took awhile to figure that out 😛
6 replies
TTCTheo's Typesafe Cult
•Created by Vida Zing on 10/12/2024 in #questions
UploadButton Error: Cannot read properties of undefined (reading 'match')
Oh I see this change is made a few minutes later in the video 😢 https://youtu.be/d5x0JCZbAJs?t=3774
6 replies
TTCTheo's Typesafe Cult
•Created by Vida Zing on 10/12/2024 in #questions
UploadButton Error: Cannot read properties of undefined (reading 'match')
I can fix this with "use client" . e.g.
6 replies
TTCTheo's Typesafe Cult
•Created by Vida Zing on 10/12/2024 in #questions
UploadButton Error: Cannot read properties of undefined (reading 'match')
I tried to debug this.
I ended up getting "Error: Cannot access uploadthing.match on the server. You cannot dot into a client module from a server component. You can only pass the imported name through." as an error. I don't know what I did to get it to start passing "^7.0.0" for the check in "function warnIfInvalidPeerDependency(pkg, required, toCheck) {"
Is this error a bug or did I do something wrong?
This is how I imported it
This was the example code file router.
6 replies