The problem may arise from upgrading the version of mongo server. E.g., when you move from 7.0 to 8.0 and try to use the existing data, in the existing folder, mongod complains about the folder being non-existent for some reason. A solution could be exporting the data using the old mongo, emptying the data folder and importing it with the new mongo server.