Category "mongodb"

Mongoose Error: "useCreateIndex" is not supported but documentation still has it

This is frustrating. No clues why I got this error while documentation still has it. Please help! My code to connect MongoDB with mongoose. const mongoose = req

Why Google Cloud Run gettings massive container restart / new instance creation?

I've been using Google Cloud Run for a year now and the issue with cloud run containers restarts / new container start is from the beginning. I've hosted Node +

MongoDB throwing "metadata corruption: files file:sizeStorer.wt and file:WiredTigerHS.wt have the same file ID 1"

My initial database was 3.2, and I spent the the time upgrading through every release to get to 4.4.0. Mongodb will no longer start when getting to 4.4.0, throw

Import MongoDB data into Hive Error: Splitter implementation is incompatible

I'm trying to import mongodb data into hive. The jar versions that i have used are ADD JAR /root/HDL/mongo-java-driver-3.4.2.jar; ADD JAR /root/HDL/mongo-hado

laravel get error of Call to a member function prepare() on null

In Laravel I have got this error, while inserting a record in my MongoDB database. Call to a member function prepare() on null namespace App\Http\Controllers;

Trying to call function by using db.eval("functionName()") in mongoDB compass version 4.4 But getting error as TypeError: db.eval is not a function

db.system.js.insertOne({ _id: 'getMachinewiseLogDat', value: function () { return db.Smx_22235_ShiftOEEDaily.aggregate([ { $group: {

I need to apply a 24hour cooldown after use, and add to the token balance on a correct answer (discord.js v13)

Here is the challenge bot slash command: const { SlashCommandBuilder } = require('@discordjs/builders'); const { MessageEmbed, MessageAttachment

How to use MongoAuditting with MongoTemplate?

i'm trying to upsert using MongoTemplate. but auditting does not work.(@CreatedDate, @ModifiedDate fields didn't save) how to enable auditing with MongoTemplate

Property 'create' does not exist on type { new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag | undefined):File; prototype: File}

I'm trying to create a file-sharing app using Multer, Cloudinary, Typescript, and Mongoose. When I'm trying to save the files uploaded by users and the data lik

How to create nested array inside $group in MongoDB?

After some of the aggregation pipeline stages, my MongoDB Document has the following format: { "key": "A", "status": "To Do", "val": 4 }, {

Use Schema inside another Schema not working. Error: CastError: Cast to [ObjectId] failed for value

What I'm trying to achieve: Use one Schema (Ingredient Schema) inside another one (Recipe Schema). My goal is that in the Recipe Schema, my ingredients key to b

Class constructor NodeEnvironment cannot be invoked without ‘new’

At first I encountered this error: https://www.mongodb.com/community/forums/t/typeerror-class-constructor-nodeenvironment-cannot-be-invoked-without-new/151980 P

Remove specific object from array during aggregation

I have documents with the following structure: {field: ["id1", "id3"]}, {field: ["id2", "id1"]} To query the documents I use aggregate({$match: {'field' : { $i

How to dynamically delete MongoDB entry using API route

I would just like to simply delete a record from a dynamically displayed list. I've tried every permutation of the backend code and ai just can't get it to work

Security group inbound rules wiped out and added 0.0.0.0/0 by eksclusterrole automatically

I have deployed AWS EKS 2 node cluster(Version 1.18). It contains some ELBs, microservices and a UI hosted on Kubernetes. ELB's have their own security group. I

All nameservers failed to answer UDP port 53 Google cloud functions python 3.7 atlas mongodb

i can connect locally to my mongodb server with the address 0.0.0.0/0. However, when I deploy my code to the cloud I get the error deploy to google cloud functi

Mongodb plugin for cakephp 2.10 which will work on php7.4

my old application was on cakephp2.5 , php 5.6 mongodb ichikaway/cakephp-mongodb, i have updated it to cakephp2.10 and php7.4 but this plugin is not working as

Jave webflux process a String-response with id's

I've a reactive API which receives the following String (image below). I want to process these ID's and perform a search query to my MongoDB and return a Flux w

login with email or phone or username in node js

How can I login email or phone or username with password in node js and mongodb? user can login with email and password, username and password, phone and passwo

MongoDB: find duplicates across multiple keys

The documents are of the type { "id": 1, "sig1": "12345", "sig2": "67890", }, { "id": 2, "sig1": "67890", "sig2": "ABCDE", }, I would like to