I have also encountered with this problem. And it was caused by upgrading mongodb without shutting mongo server down.
Now that you’ve already have the new version of mongodb (tell from the mongo shell version). You can solve it by just restarting the mongod process.
For starting and stopping mongo process, see https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes