diff --git a/backend/package.json b/backend/package.json index bbab82d..5b607d7 100644 --- a/backend/package.json +++ b/backend/package.json @@ -3,7 +3,6 @@ "version": "1.0.0", "description": "Podcastic - Multi-user podcast streaming application backend", "main": "dist/index.js", - "type": "module", "scripts": { "dev": "tsx watch src/index.ts", "build": "tsc", diff --git a/backend/src/index.ts b/backend/src/index.ts index d01298a..fc1fbf6 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -2,7 +2,6 @@ import express from 'express'; import cors from 'cors'; import 'dotenv/config'; import path from 'path'; -import { fileURLToPath } from 'url'; import { connectDB } from './config/database'; import { initRedis, closeRedis } from './config/redis'; import { errorHandler } from './middleware/errorHandler'; @@ -10,9 +9,6 @@ import authRoutes from './routes/authRoutes'; import podcastRoutes from './routes/podcastRoutes'; import episodeRoutes from './routes/episodeRoutes'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - const app = express(); const PORT = process.env.PORT || 5000; diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 306aba4..c270af5 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { "target": "ES2020", - "module": "ESNext", + "module": "CommonJS", "lib": ["ES2020"], - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "allowJs": true, "strict": true,