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

  • Home
  • SEARCH
  • 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 9157353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:59:38+00:00 2026-06-17T12:59:38+00:00

Guys In node.js, mongolian or mongo-native is not supported group function? mongo-native code, var

  • 0

Guys

In node.js, mongolian or mongo-native is not supported group function?

mongo-native code,

var mongodb = require('mongodb');
var Db      = mongodb.Db;
var Server  = mongodb.Server;
var db  = new Db( "test", new Server( "localhost", 27017 ), { w:0 } );

db.collection( "user" ).group( {
    key: { },
    reduce: function ( curr, result ) { },
    initial: { }
} );

result,

/node/ex1/node_modules/mongodb/lib/mongodb/collection.js:1400
      if(err != null) return callback(err);
                             ^
TypeError: undefined is not a function
    at Collection.group.scope (/node/ex1/node_modules/mongodb/lib/mongodb/collection.js:1400:30)
    at Db._executeQueryCommand (/node/ex1/node_modules/mongodb/lib/mongodb/db.js:1812:12)
    at Collection.group (/node/ex1/node_modules/mongodb/lib/mongodb/collection.js:1399:13)
    at Object.<anonymous> (/node/ex1/repository.js:34:25)

and mongolign code,

var Mongolian   = require( "mongolian" );
var server  = new Mongolian;
var db      = server.db( "test" );

db.collection( "user" ).group( {
    key: { },
    reduce: function ( curr, result ) { },
    initial: { }
} );

result,

db.collection( "user" ).group( {
                        ^
TypeError: Object Mongolian[mongo://localhost:27017]/assistor.user has no method 'group'
    at Object.<anonymous> (/node/ex1/repository.js:77:25)
  • 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-17T12:59:39+00:00Added an answer on June 17, 2026 at 12:59 pm

    As seen in the docs, it’s supported by the native driver, but the group method takes key, reduce, etc. as separate parameters instead of fields in an object like the shell does:

    db.collection("user").group(
        {},
        {},
        { sum: 0 },
        function (curr, result) { },
        function (err, result) {
            // Process the result
        }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok guys I have this code var text = $('.css .cont_code code'); text.contents().text(function() {
Okay, guys i have been trying to define a Stack , each node also
guys, I would like to you evaluate next code below. As you see, I
Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to
Guys, what is function called after my class loaded, where i can call self
Hey guys, sorry for, but I'm new to doubly-linked lists and was wondering if
I'm new here - and I guess you guys are the best - so
I'm quite new to node and am trying to create something that gets some
I am new to jQuery so this question might seem naive to you guys.
Guys, I have the following code that is inside a big while loop that

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.