Nextjs / Mongodb connection issue error shows when using instrumentation.js and middleware.ts
I saw this article about connecting MongoDB when the project started.
mongodb collections problem Nextjs Cached
I can’t add collection to mongodb database…. does anyone know why this is happening?
I don’t understand the process of updating the UI after submitting an answer / a comment
I have a server component that gets the initialAnswers, then it is sent through props in a client component that has an infinite scroll:
2 of the 4 filters I have create duplicate keys when fetching next pages and I can’t figure out why
So I have 4 filters.
Mongo DB fetch on client + NextJS = Maximum call stack size exceeded
I have a component where I get answers to a post, and I want the answers to be displayed like an infinite scroll, but when I call the Server Action on the client, I get the error Maximum call stack size exceeded.
findOneAndUpdate doesn’t work in Mongo db
I’m using next.js 14.2 and want to change the “comment” field in my mongo database.
here is my server action:
Next.js GET response from mongoDB is undefined
I’m writing a blog with Next.js and mongoDB with mongoose to learn CRUD with the stack. When I log the return from the Post.find() in the backend everything looks fine and is working as expected. But when it goes to the frontend in a next response it is undefined. my guess is I am applying JSON.stringify wrong or I am messing up with asynchrony somewhere (I’m also newish to Next but know React). Here is my backend code: