mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-23 06:58:03 +02:00
fix: switch backend to CommonJS to fix ESM module resolution
Remove 'type: module' and use CommonJS output so Node.js resolves imports without requiring explicit .js extensions. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ffb85ade90
commit
00d92fc668
3 files changed
+2
-7
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "ESNext",
|
||||
"module": "CommonJS",
|
||||
"lib": ["ES2020"],
|
||||
"moduleResolution": "bundler",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
"strict": true,
|
||||
|
||||
Reference in new issue
Block a user