diff --git a/backend/app.js b/backend/app.js index 69bad9e..9241761 100644 --- a/backend/app.js +++ b/backend/app.js @@ -1,5 +1,6 @@ -import express from "express"; import path from "path"; +import * as url from "url"; +import express from "express"; import logger from "morgan"; import compression from "compression"; import bearerToken from "express-bearer-token"; @@ -16,6 +17,7 @@ import memberRoutes from "./routes/member.js"; import controllerRoutes from "./routes/controller.js"; const app = express(); +const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); app.use(logger("dev")); app.use(express.json()); diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 9a4ee8f..783bef4 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "rootDir": ".", "baseUrl": ".", - "module": "CommonJS", - "moduleResolution": "Node" + "module": "NodeNext", + "moduleResolution": "NodeNext" }, "include": ["."] }