adrianhajdin / threads

Develop Threads, Next.js 13 app that skyrocketed to 100 million sign-ups in less than 5 days, and dethroned giants like Twitter, ChatGPT, and TikTok to become the fastest-growing app ever!

Home Page:https://threads-psi.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'findOneAndUpdate')

nidzammst opened this issue · comments

MongoDB connection already established
⨯ lib/actions/user.actions.ts (44:11) @ updateUser
⨯ Error: Failed to create/update user: Cannot read properties of undefined (reading 'findOneAndUpdate')
at updateUser (./lib/actions/user.actions.ts:38:19)
42 | }
43 | } catch (error: any) {

44 | throw new Error(Failed to create/update user: ${error.message});
| ^
45 | }
46 | }
47 | }

threadserror

I am having this same error too

There was something wrong with the AccountProfile.tsx file. I changed it by copying the code from the repository and now the error has resolved