Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

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

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

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

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:40:01+00:00 2026-06-13T01:40:01+00:00

I am trying to run a Node.js script locally and it’s giving me this

  • 0

I am trying to run a Node.js script locally and it’s giving me this error message:

========================================================================================
=  Please ensure that you set the default safe variable to one of the                  =
=   allowed values of [true | false | {j:true} | {w:n, wtimeout:n} | {fsync:true}]     =
=   the default value is false which means the driver receives does not                =
=   return the information of the success/error of the insert/update/remove            =
=                                                                                      =
=   ex: new Db(new Server('localhost', 27017), {safe:false})                           =
=                                                                                      =
=   http://www.mongodb.org/display/DOCS/getLastError+Command                           =
=                                                                                      =
=  The default of false will change to true in the near future                         =
=                                                                                      =
=  This message will disappear when the default safe is set on the driver Db           =
========================================================================================

Here are my variables:

var express = require('express');

var mongodb = require('mongodb');
var GridStore = require('mongodb').GridStore;
var Db = require('mongodb').Db;
var Server = require('mongodb').Server;
var db = new Db(Config.dbName, new Server("127.0.0.1", 27017, {}), {});    

var HttpGet = require('./httpGet').HttpGet;
var URL = require('url');

var dbClient = null; // this is initialized when db is opened
var app = module.exports = express();

The same scripts runs fine on my live server. It only complanes when I run it locally.

I found this same issue being discussed on github but found no solution.
https://github.com/kissjs/node-mongoskin/issues/77

Anyone know what could cause this problem?

Thanks in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:40:01+00:00Added an answer on June 13, 2026 at 1:40 am

    The following works for me using the 1.1.11 mongo driver:

    var db = new Db(Config.dbName, new Server("127.0.0.1", 27017, {}), {safe: true});
    

    Without the {safe: true} parameter I do get the same warning as you show in your question.

    This warning was a very recent addition to the driver; you’re probably using an older version of the driver on your server which is why you don’t see the warning there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run node.js under unix, and getting this error dooing that: var
I'm trying to setup & run microtime package , but node raised an error:
I'm trying to run multiple instances of a node server using a bash script.
I'm trying to create a launcher for node.js scripts (so that I can run
I'm trying to run a javascript file in Gitbash but getting this error. $
As per this question: node.js image compression I'm trying to run pulverizer in node.js,
I am trying to run my hadoop map/reduce job inside eclipse (not a node
I'm trying to create a websocket server with Node.js to run on a Windows
When trying to run a junit test I get the following error - java.lang.ClassCastException:
I'm getting an error when trying to emulate an YUI Anim sample: <script src=http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js></script>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.