Here is the content of my data-source.ts file:
import {DataSource} from "typeorm";
import path from "path";
import {User} from "./entity/User";
import { config } from "dotenv";
config();
export const AppDataSource = new DataSource({
type: "postgres",
host: process.env.DATABASE_HOST,
port: parseInt(process.env.DATABASE_PORT),
username: process.env.DATABASE_USERNAME,
password: process.env.DATABASE_PASSWORD,
logging: true,
entities: [
User,
],
migrations: [
path.join(__dirname, "./migration/*"),
],
});
When attempting to generate a migration using
yarn typeorm-ts-node-esm -d ./dist/data-source.js migration:generate ./src/migration/init
,
I encounter the following error message:
SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
Any advice on how to resolve this issue?
I have experimented with different typeorm configurations but none have been successful so far