node-mongodb-native Questions
5
I'm using native mongo driver in Joyent cloud, the node.js application runs fine locally but in Joyent when I run with the username/password that they provided it fails to connect.
This is the code...
Wadley asked 20/4, 2013 at 19:24
6
Solved
My project(NextJS) was working fine and suddenly I am experiencing the issue ModuleNotFoundError. Particularly in the case of dynamic routing of nextJs.
Error I see is: Module not found: Error: Can...
Geostatic asked 8/11, 2020 at 15:1
2
Im relatively new to the MongoDB. At first I used mongoose, but now I decided to abandon it. Immediately I ran into the following problem: I can't understand how to print all the performed queries ...
Unscientific asked 8/11, 2019 at 18:9
3
Solved
I have collection with name products with almost 100k documents. I want to introduce a new key called secondaryKey with unique value uuid in all the documents.
I do this using nodejs.
Problem I am ...
Biographical asked 18/3, 2021 at 9:49
6
Solved
Why I can't remove record by _id?
Code:
db.collection('posts', function(err, collection) {
collection.remove({_id: '4d512b45cc9374271b00000f'});
});
Borrero asked 15/10, 2012 at 18:17
5
Solved
When compiling any typescript program that just imports mongodb, i get 12 errors like:
node_modules/mongodb/mongodb.d.ts:3309:5 - error TS2416: Property 'end' in type 'GridFSBucketWriteStream' is n...
Mailable asked 6/1, 2022 at 12:38
7
Solved
I using Node-Mongo-Native and trying to set a global connection variable, but I am confused between two possible solutions. Can you guys help me out with which one would be the good one?
1. Solutio...
Slavism asked 21/3, 2018 at 3:23
0
I'm refactoring a big (~8,000 line) single file app into a 'separate-route', 'MVC-style' app.
I want to apply 'best practises' to the folder/file structure and the contents of app.js.
I'm trying to...
Sansbury asked 26/11, 2021 at 14:11
2
Solved
I'm trying to write a script to add an admin user and a generic user to the MongoDB database using mongodb NodeJS driver - version 3.0.1
I'm able to create the admin user, but not general user for...
Diapause asked 7/1, 2018 at 14:27
3
Solved
I'm always connecting to the "admin" DB, which is a fixed bug.
Using Mongoose 5.0.6 MongoDb 3.6 and trying to connect to Atlas.
My question, what driver Mongoose 5.0.6 depend on?
How can I find ...
Millian asked 22/2, 2018 at 0:8
3
Solved
i use node.js and node-mongodb-native driver, with connection pooling. is there any way to enable debug for see what's happening, how many connections are active and when a connection is opened or ...
Circular asked 2/10, 2012 at 14:31
1
After setting useUnifiedTopology=true, the Auto Reconnect stopped working and generates the following ERRORS:
DeprecationWarning: The option `reconnectInterval` is incompatible with the unified to...
Charterhouse asked 24/12, 2019 at 8:10
1
Solved
We are trying to implement the strategy outlined in the following presentation (slides 13-18) using nodejs/mongo-native driver.
https://www.slideshare.net/mongodb/securing-mongodb-to-serve-an-aws...
Atmospheric asked 4/8, 2019 at 8:44
2
Solved
I want to get the count of posts documents using:
db.collection('posts').count()
But, I got a warning:
DeprecationWarning: collection.count is deprecated, and will be removed in a future version....
Naphthol asked 3/7, 2018 at 3:11
2
I'm trying to get "connection lost" or something similar when connection lost between nodejs and mongodb server.
I use native driver and has following code
var mongo = require('mongodb');
var serv...
Skiagraph asked 21/1, 2014 at 21:21
2
Solved
Running the following text search directly on MongoDB results in no issues:
db.getCollection('schools').find({
$text:
{
$search: 'some query string',
$caseSensitive: false,
$diacriticSensitiv...
Osmium asked 25/2, 2018 at 16:23
2
Solved
I am using mongo and node.js in an application. The mongo database consists of two servers.
In the example given in http://howtonode.org/express-mongodb, i can connect to one server using:
Arti...
Wellappointed asked 12/9, 2012 at 9:8
1
For every operation my application does on MongoDB I want to have the old and new version of the document so I can emit an event with both version:
{
type: 'UPDATE',
before: documentBeforeUpdate...
Hyo asked 17/4, 2018 at 10:11
3
Solved
I want to make use of the promises feature where in I can connect to mongodb synchronously and I can reuse the connection by passing it on to different modules.
Here is something that I came up w...
Guttering asked 10/5, 2016 at 19:2
2
Solved
I can't seem to find any examples of MongoDB error objects in their documentation or on the internet.
What does an example MongoDB error object look like? I'd like to "handle" the error and/or ref...
Horsy asked 15/12, 2013 at 17:55
5
Solved
I am trying to connect my node app to mongodb via mongoose. It seems to be working, as I can add documents, but I get the error { [Error: Trying to open unclosed connection.] state: 2 }.
I created...
Prau asked 11/8, 2014 at 19:3
2
Solved
Using the native 'mongodb' npm package, I'm receiving
Error: connection closed due to parseError
When making a very basic query:
collections.myCollection.findOne({id: someID}, function (err, ...
Dichromatic asked 23/10, 2013 at 15:54
2
Solved
I'm using node-mongodb-native driver with mongodb to write a website.
I have a question about how to open mongodb connection once, then use it in collection name users in user.js and collection na...
Sort asked 15/7, 2013 at 6:12
2
We do read an XML file (using xml-stream) with about 500k elements and do insert them into MongoDB like this:
xml.on(`endElement: product`, writeDataToDb.bind(this, "product"));
Insert in writeD...
Bollinger asked 17/2, 2017 at 16:35
5
I'd like to use the MongoDB native JS driver with bluebird promises. How can I use Promise.promisifyAll() on this library?
Unbidden asked 20/5, 2014 at 23:58
1 Next >
© 2022 - 2024 — McMap. All rights reserved.