Serverless offline start error due to MongoDB connection string

Solution 1:

Create a new file named as config.json & put MONGODB_URI value this way:

{
  "MONGODB_URI": "the uri of mongodb server"
}

Also modify your serverless.yml file.

environment:
    MONGODB_URI: ${file(config.json):MONGODB_URI}