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

Tru*_*ran 7 postgresql node.js knex.js

我正在node.js中构建一个应用程序并使用knex ORM.我在运行迁移时遇到问题 - 我一直收到错误消息:

Error: There is no pool defined on the current client

这是我的连接配置:

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
  })
};
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

提前致谢!