I am encountering a situation similar to the one described in this post. I'm following Ben Awad's YouTube tutorial: you can see where I am in the tutorial here.
Objective: My goal is to execute npx mikro-orm migration:create
in order to generate a Mikro ORM migration as demonstrated in the tutorial.
Actions Taken So Far: I successfully set up Postgres 13 and established connections via the psql CLI (SQL Shell) and pgAdmin tool. However, when I run npx mikro-orm migration:create
in my VS Code terminal, I encounter the following error:
Error: password authentication failed for user "postgres"
at Parser.parseErrorMessage (C:\EJdesktop\Web Dev\playground\reddit-server\node_modules\pg-protocol\src\parser.ts:357:11)
...
This is how my mikro-orm.config.ts
file looks like:
import { __prod__ } from "./constants";
import { Post } from "./entities/Post";
import { MikroORM } from "@mikro-orm/core";
import path from "path";
export default {
migrations: {
path: path.join(__dirname, './migrations'),
pattern: /^[\w-]+\d+\.[tj]s$/,
},
entities: [Post],
dbName: 'postgres',
type: 'postgresql',
debug: !__prod__
} as Parameters<typeof MikroORM.init>[0]
After trying to modify my pg_hba.conf
file to include additional lines according to the example mentioned in the previous link, the issue persists.
If you need any further clarification or have any advice, please let me know.