79622895

Date: 2025-05-15 08:24:05
Score: 1.5
Natty:
Report link

Could you please try using absolute paths for Entities and Migrations?

import { DataSource } from "typeorm";
import * as path from "path";

export default new DataSource({
  type: "postgres",
  host: process.env.POSTGRES_HOSTNAME,
  port: parseInt(process.env.POSTGRES_PORT),
  username: process.env.POSTGRES_USERNAME,
  password: process.env.POSTGRES_PASSWORD,
  database: process.env.POSTGRES_CONTENT_DATABASE,
  synchronize: false,
  logging: true,
  entities: [path.join(__dirname, "../entity/content/*.{ts,js}")],
  migrations: [path.join(__dirname, "../migrations/content/*.{ts,js}")],
});
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Dustin Lee