skip to Main Content

Mongodb – This Serverless Function has timed out

I create a chat app using mern stack. After deploy server in vercel. but it is not work. there is a error in vercel log. Legacy server listening... MongoServerError: bad auth : authentication failed at Connection.onMessage (/var/task/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:207:30) at MessageStream.<anonymous> (/var/task/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:60:60)…

VIEW QUESTION

Mongodb – Import Mongoose lib in api directory in Next js 13.2 app directory gives error

In hello.js import connectMongo from '../../../util/connectDB'; import UserModel from '../../../models/UserModel'; import { NextResponse } from 'next/server' export async function GET(request) { return NextResponse.json({hello: 'Hello, Next.js!'}) } export async function POST(request) { const data = await request.json(); console.log(data); return NextResponse.json(data) }…

VIEW QUESTION
Back To Top
Search