Skip to content

'aggregate' does not exist in angular2-meteor #40

@kai-iak

Description

@kai-iak

Installing package in angular2-meteor project does not work.

To reproduce:

  1. Start with some code from the Socially tutorial
  2. In Terminal Run:
    meteor npm install and meteor
  3. Add package:
    meteor add meteorhacks:aggregate
  4. Add the following code to server\publications\parties:
Meteor.publish('party', function(partyId: string) {
  var metrics = new Mongo.Collection('metrics');
var pipeline = [
  {$group: {_id: null, resTime: {$sum: "$resTime"}}}
];
var result = metrics.aggregate(pipeline);
  return Parties.find(buildQuery.call(this, partyId));
}); 

Error appears in the terminal:
server/imports/publications/parties.ts (13, 22): Property 'aggregate' does not exist on type 'Collection<{}>'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions