Skip to main content
  1. About
  2. Stack Internal
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 0
2 answers
67 views

I have designed a Product schema based on the Attribute Pattern. The aim is to allow users to query data using different parameters. Product Schema: const AttributeSchema = new Schema({ k: { type: ...
  • reputation score 171
Best practices
0 votes
0 replies
68 views

I am migrating a NestJS backend from TypeORM + native MongoDB usage to Mongoose. Most collections have already been migrated successfully using @nestjs/mongoose and InjectModel. However, I still have ...
  • reputation score 1
Score of 0
0 answers
123 views

I have a Node.js application using Mongoose against a single-node MongoDB replica set running in Docker. Environment: My application connects with a seed URI like this: const dbURI = `mongodb://user:...
Score of 0
0 answers
135 views

I am building a MERN application and trying to connect my Node.js backend to MongoDB Atlas using Mongoose. However, when I start my server, I get the following error: Error: querySrv ECONNREFUSED ...
Score of 1
2 answers
75 views

I am facing an issue with a MongoDB aggregation pipeline that uses the $lookup operator. The goal is to create a pipeline that filters data in my database based on input fields and returns the ...
  • reputation score 11
Score of 1
1 answer
85 views

I am trying to create a reusable MongoDB connection function using Mongoose in a Node.js / Next.js project with TypeScript. To prevent multiple connections during hot reload, I am caching the ...
  • reputation score 39
Score of 1
2 answers
74 views

I have this search index in my Atlas Cloud DB: ` { "mappings": { "dynamic": false, "fields": "email": [ { "maxGrams": 12, "minGrams&...
  • reputation score 1386
Score of -1
2 answers
88 views

TypeScript this Error in Mongoose Static Method with timestamps + Virtual Populate Question I am using Mongoose 9.2.2 with TypeScript 5.9.3, and I have a schema that includes: timestamps: true a ...
  • reputation score 8
Score of 0
1 answer
133 views

I'm facing a persistent connection issue with Mongoose and MongoDB Atlas ever since I updated/reinstalled Node.js to version v22.22.0. Interestingly, the exact same code works perfectly when deployed ...
  • reputation score 1
Score of 1
1 answer
82 views

I'm working on an AWS Lambda that needs to encrypt some data going to Mongo Atlas via CSFLE. I have logic in place that creates and saves the DEK to Atlas no problem, but when I use Mongoose to ...
  • reputation score 13
Score of 2
2 answers
106 views

I want to return a specific subdocument which is nested in a second level array. My problems are: The document is deeply nested The fields (keys) are dynamic and based on req.body values The ...
  • reputation score 103
Score of 2
1 answer
2175 views

MongoDb Connection failed : Error: querySrv ECONNREFUSED How can I solve this error? My node v24.13.0 and mongoose 9.1.5 are the latest versions. Also I changed my network dns to Google's dns number ...
  • reputation score 71
Score of 5
1 answer
1699 views

I’m running into a MongoDB connection issue that only appeared after switching Node.js versions, and I haven’t been able to resolve it despite extensive troubleshooting. Environment OS: Windows 10 ...
  • reputation score 91
Score of 0
0 answers
49 views

I'm trying to generate a compatible type for Mongoose/bson ObjectId for a part of my repo which holds types which is shared between my Frontend and my Backend. I don't want to install/load mongoose or ...
  • reputation score 178
Score of 3
0 answers
84 views

I am building a multi-tenant application, and I am using a global plugin instead of adding a plugin to each model one by one. This plugin will handle adding organizationId during filters, saving, and ...

15 30 50 per page
1
2 3 4 5
...
3107

AltStyle によって変換されたページ (->オリジナル) /