我在迁移到Ubuntu Linux时遇到问题.我可以在终端中使用Postgres.所以我对Postgres密码没有问题.
当我输入:knex migrate:latest --env development
我得到:
Using environment: development
Knex:warning - Pool2 - Error: Pool was destroyed
Knex:Error Pool2 - error: password authentication failed for user "user"
我已经从相关问题的其他答案中读到了pg_hba.conf并将方法设置为信任.我做到了这一点,但没有改变.我的knex.js文件看起来像这样:
module.exports = {
devolopment: {client: 'pg',
connection: 'postres://localhost/bikesdb'
},
production: {
client: 'pg',
connection: process.env.DATABASE_URL
}
};
我不确定我做错了什么.