sequelize / cli

The Sequelize CLI
MIT License
2.53k stars 526 forks source link

Authentication fails in Node.js v6 #293

Closed dylanfoster closed 8 years ago

dylanfoster commented 8 years ago

Versions:

output:

Sequelize [Node: 6.0.0, CLI: 2.4.0, ORM: 3.22.0]

(node:64771) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Loaded configuration file "config/db.js".
Using environment "development".
Unable to connect to database: SequelizeConnectionError: password authentication failed for user "postgres"

The only difference here is the Node.js version, my config Object did not change and works properly in Node v5.10 and v5.11

lostintime commented 8 years ago

@dylanfoster had same issue, but it worked after re-installed all dependencies: rm -R node_modules; npm install. Versions:

sdepold commented 8 years ago

Hm so maybe it's because of some compilation incompatibilities?

dylanfoster commented 8 years ago

@lostintime nice that worked. @sdepold yes seems like a compilation issue between Node 5 and 6

charlesdg commented 8 years ago

I have this issue with Heroku, no one encountered it?

kevingo commented 8 years ago

I also have this issue. Versions:

fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

Unable to connect to database: SequelizeConnectionError: password authentication failed

charlesdg commented 8 years ago

We resolved it with an update of pg (4.5.5).

kevingo commented 8 years ago

Thanks. It's the problem of pg indeed.

robela commented 7 years ago

updating pg works for me

oeddyo commented 6 years ago

strange... I just got this error.

The configuration I have is like:

{ "development": { "username": "development", "password": "123456", "database": "development", "host": "127.0.0.1", "dialect": "postgres" }, "test": { "username": "test", "password": "123456", "database": "test", "host": "127.0.0.1", "dialect": "postgres" }, "production": { "uername": "production_user", "password": "XXXX", "database": "production", "host": "XXXX", "dialect": "postgres" } }

however whenver I run sequelize, it tries to use the user "ubuntu" to do the migration.

oeddyo commented 6 years ago

ubuntu@ip-172-31-1-174:~/magic-tribe$ NODE_ENV=production ./node_modules/.bin/sequelize db:migrate

Sequelize CLI [Node: 6.11.2, CLI: 3.0.0, ORM: 4.14.0]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4. https://github.com/sequelize/cli#sequelize-support

Loaded configuration file "mt-db/src/config/database.json". Using environment "production". sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules/sequelize/lib/sequelize.js:236:13

ERROR: password authentication failed for user "ubuntu"