diff --git a/package-lock.json b/package-lock.json index 2f828d5f74..1c0b80b077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "jwt-decode": "^4.0.0", "lodash": "^4.17.21", "markdown-toc": "^1.2.0", - "mongodb": "6.3.0", + "mongodb": "^6.3.0", "mongoose": "^8.2.0", "mongoose-paginate-v2": "^1.8.0", "morgan": "^1.10.0", diff --git a/package.json b/package.json index bf82356da3..85a3d40b32 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "jwt-decode": "^4.0.0", "lodash": "^4.17.21", "markdown-toc": "^1.2.0", - "mongodb": "6.3.0", + "mongodb": "^6.3.0", "mongoose": "^8.2.0", "mongoose-paginate-v2": "^1.8.0", "morgan": "^1.10.0", diff --git a/setup.ts b/setup.ts index 2f5985f045..bc7ff108f4 100644 --- a/setup.ts +++ b/setup.ts @@ -7,7 +7,7 @@ import path from "path"; /* eslint-disable */ import type { ExecException } from "child_process"; import { exec } from "child_process"; -import mongodb from "mongodb"; +import mongodb, { MongoClient } from "mongodb"; import { MAXIMUM_IMAGE_SIZE_LIMIT_KB } from "./src/constants"; import { askForMongoDBUrl, @@ -210,7 +210,7 @@ async function askForTransactionLogPath(): Promise { */ export async function shouldWipeExistingData(url: string): Promise { let shouldImport = false; - const client = new mongodb.MongoClient(url); + const client = new MongoClient(`${url}`); try { await client.connect(); const db = client.db();