Aggregate is not defined

2020-03-29T23:07:47.885+0530 E QUERY [js] uncaught exception: ReferenceError: aggregate is not defined :
@(shell):1:16

I got this error when i try to query “db.solarSystem,aggregate([{$match:{type:{$ne:“Star”}}}]).pretty()”.

Look very carefully at your code from left to right. Do you see what’s wrong?

This also a good hint:

1 Like

Hi @Aditya_Sriivatsalan_68872,

I hope you were able to resolve the issue.

Please feel free to reach out if you have any questions.

Thanks,
Sonali