Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
15 views

Aggregate vs Populate methods when to use one in nodejs Mongose

I am creating asset managment tool for warehouse and I have Warehouse , Asset, Category models. I want to get the overall stats of each warehouse like , total assets and how many of them is active or ...
Ali's user avatar
  • 1
0 votes
1 answer
22 views

Mongoose connection drops at all endpoints

I’ve been working on a project intermittently for some time now. Recently, after transitioning to a new computer, and router none of my endpoints respond I’ve taken several troubleshooting steps ...
Slowly_Learning's user avatar
1 vote
0 answers
37 views

Cannot get data with Mongoose .populate()

Listing schema : const listingSchema = new Schema({ title : { type :String, required : true, }, description : String, image : { type : String, default : ...
Priya 's user avatar
  • 11
-1 votes
1 answer
52 views

Store object array of product size and colors in mongo DB

I need to store object array of product size and colors. Is it possible in mongo DB.(Because in ms sql it is not allowed).If so how the schema should be?.Sample object structure is shown below { color ...
yasith's user avatar
  • 37
0 votes
1 answer
53 views

Query MongoDB documents for a particular date range [duplicate]

I am trying to query documents based on particular date range. So I need all the documents where the createdDate is less than equal to current date and greater than equal to currentDate - 2. I am ...
Nikhil Bansal's user avatar
-1 votes
0 answers
65 views

MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017

I'm having problem using mongodb. I downloaded as said in docs for debian (i'm using kali linux) and first day it was fine. Everything i did worked well. Now for second boot up it started giving me ...
Lobiani1's user avatar
0 votes
0 answers
23 views

If i try to set src of an img variable that is not a valid url in ejs template, it throws an error [duplicate]

This is the code to fetch data from mongodb and then send it to ejs template to render. the data object is fetched correctly, I checked by console.log the data object,and there are no validators set ...
Rajneesh Bansal's user avatar
-1 votes
0 answers
13 views

Is it possible to update the :slug parameter in the query with react and redux toolkit

I am using :slug instead of :id in the url and the value does not update when slug is in the query parameters. This is the form(I am using react-hook-form): import { useUpdateLogMutation, ...
Vasilis Zisis's user avatar
0 votes
0 answers
34 views

Handling 411 Length Required Error in Axios POST Request in React Signup Component

I was building a payment app (paytm app) using react, express, mongodb, mongoose, tailwind where i made separate components and pages for the frontend. but when i was just trying to hit backend from ...
Ratnesh's user avatar
  • 15
0 votes
0 answers
40 views

Why isn't it updating the elements mongdb database?

products.map(async (prdct) => { try { let srchdPrdct = await ProductSchema.findById(prdct.product); let dscntPrice = Math.round( srchdPrdct.price * 83.49 * ...
MR. WOLF's user avatar
0 votes
2 answers
49 views

The filter is not returning the different id's its returning everything

So, i have been trying to make a function that deletes reviews and it just isn't working. I narrowed it down, and it seems that the filter is not working correctly, couldn't figure out why. Please ...
Soumodeep Samanta 033's user avatar
0 votes
0 answers
10 views

Uploading session data from Express js server to Redis

I am trying to upload the session data to redis whenever a user logs in onto my react native app. Im getting this error "Argument of type 'unknown' is not assignable to parameter of type '...
Nick Williams's user avatar
1 vote
3 answers
56 views

How to limit bucket upload size in Backblaze B2 (S3 COMPATIBLE API)?

I'm implementing a functionality in our app where users buy a subscription and create their workspace. Each subscription plan has different storage limits (e.g, 5 GB for a small plan). We use ...
Mohammad Riyan's user avatar
1 vote
1 answer
65 views

Unable to populate my fields using populate()

This is my product.js model const mongoose = require("mongoose"); const { Schema } = mongoose; const productsSchema = new mongoose.Schema({ name: { type: String, ...
das's user avatar
  • 13
1 vote
2 answers
90 views

I am unable to get Mongoose Aggregate method to work

I am building an api and I wanted to use the skip and limit methods in mongoose to handle pagination. I would like to get the total document size along with the pagination data. Initially, I made two ...
valve's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
631