Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5870

Export pipeline to Node.js code doesn't work with newer versions of driver

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.32.6
    • Affects Version/s: None
    • Component/s: Export to Language
    • None
    • 3
    • Iteration Grouper
    • Not Needed

      Problem Statement/Rationale

      Exporting simple aggregation pipeline to Node.js doesn't work with recent versions of MongoDB Node.js driver (eg. 4.6.0).

      Steps to Reproduce

      Export pipeline to Node.js (selecting "Include Import Statements" and "Include Driver Syntax") and then run with a recent version of Node.js driver.

      Expected Results

      The exported script should execute cleanly.

      Actual Results

      You will likely see the following error being raised:

      /path/to/node_modules/mongodb/lib/collection.js:372
                  throw new error_1.MongoInvalidArgumentError('Argument "options" must not be function');
                  ^
      

      Additional Notes

      Installing an older version of the driver (eg. 3.6.12) allows the script to execute without issue.

      Can we please have this code updated to work with both older and newer versions of the driver?

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            matthew.thompson@mongodb.com Matthew Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: