This error occurs when you call getConnection method on PoolNamespace instance.
The lib/pool_cluster.js file requires a cb parameter (1 argument) but it's undefined because PromisePoolCluster.getConnection in promise.js sends three (3) arguments: pattern, selector and a callback function, so wether calls getConnection without any argument, the cb argument is always undefined.
MyClass.ts
private get connection(): Promise<PoolConnection> {
return this._connection ??= this.pool.getConnection();
}
This error occurs when you call getConnection method on PoolNamespace instance.
The lib/pool_cluster.js file requires a cb parameter (1 argument) but it's undefined because PromisePoolCluster.getConnection in promise.js sends three (3) arguments: pattern, selector and a callback function, so wether calls getConnection without any argument, the cb argument is always undefined.
MyClass.ts
promise.js
pool_cluster.js
Environment