Skip to content

v7.0.0-alpha.1 - MongoInvalidArgumentError: Argument "options" must not be function #729

Open
@lien-dkseo

Description

@lien-dkseo

Steps to reproduce

const cursor = (await this.studyRepository.execute(
  'Study',
  'aggregate',
  [
    {
      $facet: {
        StudyCount: ...,
        SampleTypeCount: ...,
      },
    },
  ],
)) as AggregationCursor;

Current Behavior

MongoInvalidArgumentError: Argument "options" must not be function
    at Collection.aggregate (d:\dev\lien\samplebox-web-backend\node_modules\loopback-connector-mongodb\node_modules\mongodb\lib\collection.js:371:19)
    at d:\dev\lien\samplebox-web-backend\node_modules\loopback-connector-mongodb\lib\mongodb.js:602:38

Expected Behavior

working code in 6.2.0

Link to reproduction sandbox

Additional information

win32 x64 18.15.0

├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── [email protected]
├── [email protected]

Related Issues

See Reporting Issues for more tips on writing good issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions