Fav*_*Fav 3 postgresql ubuntu knex.js
我在迁移到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
}
};
我不确定我做错了什么.
您最有可能在节点上运行,6.x.x因此您需要升级您的pg软件包版本npm install --save pg@4.5.5
参考:https://github.com/tgriesser/knex/issues/1371
| 归档时间: |
|
| 查看次数: |
4844 次 |
| 最近记录: |