I am calling the same .find()
operation on MongoDB collection. I am connected to the same MongoDB in both the development environment and production (Vercel). In development environment I get results, but in production not:
const invoices = await db
.collection('invoices')
.find({
$and: [
{company: company_regex},
{status: status_regex},
{country: country_regex},
]
})
.sort({_id:-1})
.limit(limit)
.skip(skip)
.toArray();
The only difference is that Vercel is using Node.js v 20 locally I use 21.7.1… Could this be the reason?