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!
https://threads-psi.vercel.app
1.49k stars 285 forks source link

Cannot read properties of undefined (reading 'findOneAndUpdate') #98

Open nidzammst opened 10 months ago

nidzammst commented 10 months ago

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 | }

Mishael-Joe commented 10 months ago

threadserror

I am having this same error too

nidzammst commented 9 months ago

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

FestusKoech commented 3 months ago

That's an error with the MONGODB_URL password. Do not use characters like # @ $ etc., instead, use auto-generated password to avoid errors.