Estou recebendo o mesmo problema citado no topico anterior, a versão do MongoDB que estou utilizando é a 4.2.0
 db.alunos.aggregate([{     "$geoNear":{         "near": {             "coordinates":[-23.588055, -46.632403],
    "type":"Point" }, "distanceField": "distancia.calculada", "spherical": true, "num":4 } }])
2019-09-20T12:18:16.736-0300 E  QUERY    [js] uncaught exception: Error: command failed: {
        "ok" : 0,
        "errmsg" : "$geoNear no longer supports the 'num' parameter. Use a $limit stage instead.",
        "code" : 50857,
        "codeName" : "Location50857"
} : aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:18:14
_assertCommandWorked@src/mongo/shell/assert.js:583:17
assert.commandWorked@src/mongo/shell/assert.js:673:16
DB.prototype._runAggregate@src/mongo/shell/db.js:266:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1012:12
@(shell):1:1