Getting Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
Asked Answered
B

3

10

I have installed Postgres 13 in windows 10. Configured all the right credentials in the environment file of the project. The project uses the below dependencies and it was created in ubuntu.

"pg": "^7.4.3",
"pg-hstore": "^2.3.2",
"sequelize": "4.38.0",
"sequelize-cli": "^6.2.0"

I'm trying to set it up in windows. And getting the below error in windows 10.

Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }

When I hit npx sequelize db:migrate in the terminal for migrating the tables in the database.

Brochure answered 8/5, 2021 at 8:28 Comment(0)
J
26

I was able to fix this by upgrading pg from "^7.4.3" to "^8.7.1".

Julius answered 3/10, 2021 at 21:6 Comment(3)
Yes, the same solution worked for me.Kiyokokiyoshi
This worked for me as well. The situation was different but the error was the same.Norling
worked for me, absolute gem, thanksPracticable
A
0

Based on the comment by @nanaya here

You can try to use pg-native, and set env to NODE_PG_FORCE_NATIVE=1 before executing the migration.

$ npm i pg-native
$ export NODE_PG_FORCE_NATIVE=1
$ npx sequelize db:migrate
Angele answered 26/6, 2023 at 14:4 Comment(0)
I
-1

This issue comes if your Database Host is incorrect. In my case I'm using Docker and change DB host in consule file from localhost to your DB server.

Ingratiate answered 3/12, 2021 at 5:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.