Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/mongoose

Discy Latest Questions

Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 3
Kenil Vasani
Asked: December 22, 2020

nodemon – app crashed – waiting for file changes before starting

  • 3

I just started learning Node.js. The idea of this small application is to use express and mongosse to store some users in a based cloud database (mongoDB via mlab). I have two seperate files : User.js (models/User.js) var mongoose = require('mongoose'); module.exports = mongoose.model('User', ...

expressmongodbmongoosenode.jsnodemon
  • 1 1 Answer
  • 24 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 22, 2020

MongoDB connection error: MongoTimeoutError: Server selection timed out after 30000 ms

  • 8

I am trying to create a fullstack app reading the following tutorial: https://medium.com/javascript-in-plain-english/full-stack-mongodb-react-node-js-express-js-in-one-simple-app-6cc8ed6de274 I followed all steps and then tried to run: node server.js But I got the following error: MongoDB connection error: MongoTimeoutError: Server selection timed out after 30000 ms

mongodb-atlasmongoosenode.js
  • 1 1 Answer
  • 11 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 7
Kenil Vasani
Asked: December 22, 2020

Error at connecting to MongoDb Atlas Server

  • 7

So I’m currently wirting a web application and I need database so I decided to go with mongodb and mongoose. Until now I tested everything on localhost and it worked but I wanted to move the data to a server. ...

mongodbmongodb-atlasmongoosenode.js
  • 1 1 Answer
  • 9 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 4
Kenil Vasani
Asked: December 22, 2020In: Javascript

What is a TransientTransactionError in Mongoose (or MongoDB)?

  • 4

I have server.js and db.js The db.js file interacts with my database using Mongoose and I use server.js to call functions from db.js : var mongoose = require('mongoose'); mongoose.connect('', { useNewUrlParser: true }) var Schema = mongoose.Schema; module.exports = function () { ...

javascriptmongodbmongoosenode.js
  • 1 1 Answer
  • 12 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 3
Kenil Vasani
Asked: December 22, 2020

Mongoose: how to use aggregate and find together

  • 3

How can I use aggregate and find together in Mongoose? i.e I have the following schema: const schema = new Mongoose.Schema({ created: { type: Date, default: Date.now() }, name: { type: String, default: 'development' } followers: ...

aggregation-frameworkmongodbmongodb-querymongoosenode.js
  • 1 1 Answer
  • 11 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 2
Kenil Vasani
Asked: December 19, 2020

Error Message: MongoError: bad auth Authentication failed through URI string

  • 2

I’m trying to connect to my mongoDB server via the connection string given to me by mongo: "mongodb+srv://david:[email protected]/test?retryWrites=true" In my code I am calling the connection through mongoose like this (obviously putting in my password): const mongoose = require('mongoose'); const db = ...

mongodbmongoosenode.js
  • 1 1 Answer
  • 10 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 1
Kenil Vasani
Asked: December 19, 2020

ERR_HTTP_HEADERS_SENT: Cannot set headers after they are sent to the client

  • 1

I’m facing this weird issue in NodeJS when using with Passport.js, Express and Mongoose. Basically, I get an error saying “Cannot set headers after they are sent to the client” even though I don’t send more than one header. I’ve read ...

expressexpress-jwtmongoosenode.js
  • 1 1 Answer
  • 9 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 8
Kenil Vasani
Asked: December 19, 2020

DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead?

  • 8

I am using mongoose findOneAndUpdate but still getting the error, DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead. But I am not even using findAndModify, why is it converting my query to findAndModify?

deprecatedmongodbmongoosenode.js
  • 1 1 Answer
  • 12 Views
Answer
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 1
Kenil Vasani
Asked: December 19, 2020

(node:63208) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead

  • 1

This question already has answers here: MongoDB mongoose Deprecation Warning ...

mongodbmongoosenode.js
  • 1 1 Answer
  • 9 Views
Answer

Sidebar

Ask A Question
  • Popular
  • Kenil Vasani

    SyntaxError: invalid syntax to repo init in the AOSP code

    • 5 Answers
  • Kenil Vasani

    runtimeError: package fails to pass a sanity check for numpy ...

    • 3 Answers
  • Kenil Vasani

    xlrd.biffh.XLRDError: Excel xlsx file; not supported

    • 3 Answers
  • Kenil Vasani

    Homebrew fails on MacOS Big Sur

    • 3 Answers
  • Kenil Vasani

    Error: PostCSS plugin tailwindcss requires PostCSS 8

    • 2 Answers

Explore

  • Most Answered
  • Most Visited
  • Most Voted
  • Random

© 2020-2021 ErrorCorner. All Rights Reserved
by ErrorCorner.com