在当前客户端上没有定义池 – knex.js + node + postgresql

我在node.js中构build一个应用程序并使用knex ORM。 我无法运行我的迁移 – 我不断收到错误:

Error: There is no pool defined on the current client

这是我的连接configuration:

 module.exports = { knex: require('knex')({ client: 'pg', connection: { host: env.DB_HOST, user: env.DB_USER, password: env.DB_USER_PASSWORD, database: env.DB_NAME }, pool: { min: 0, max: 7 }, searchPath: env.DB_SEARCHPATH }) }; 

有人可以帮忙吗?

提前致谢!