Moving from legacy mongo shell to mongosh

I came across this problem when I started migrating my databases from mongo 5.0 to mongo 6.0. Where the switch to the new mongo shell…