diff --git a/examples/with-mongodb/lib/mongodb.ts b/examples/with-mongodb/lib/mongodb.ts index 7aaf63e04cec..9397929118bb 100644 --- a/examples/with-mongodb/lib/mongodb.ts +++ b/examples/with-mongodb/lib/mongodb.ts @@ -8,7 +8,7 @@ const uri = process.env.MONGODB_URI const options = {} let client -let clientPromise +let clientPromise: Promise if (!process.env.MONGODB_URI) { throw new Error('Please add your Mongo URI to .env.local')