You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, running knex/postgres on node:14.x using @keystonejs/[email protected] will not connect to a database because of a dependency on pg 7.x which does not work with node:14.x
Now we will use the default ssl options to tls.connect which includes rejectUnauthorized being enabled. This means your connection attempt may fail if you are using a self-signed cert. This makes pg a bit more secure "out of the box" while still enabling you to opt in to the old behavior.
Temporary fix
Using yarn resolutions to force versions on node:14.x:
Thanks for sharing @iamacup - was starting to pull my hair out on this one! The error message was not really helpful. Adding full error message I received to improve searchability on this one:
Keystone error:
Could not connect to database:
Knex error:
Error: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
At the moment, running
knex/postgres
onnode:14.x
using@keystonejs/[email protected]
will not connect to a database because of a dependency onpg 7.x
which does not work withnode:14.x
knex/knex#3831 (comment)
brianc/node-postgres#2180
Knex 0.21.1
currently depends onpg 8.0.3
which fixes this issueSuggested fix
bump versions in
@keystonejs/adapter-knex
: https://github.com/keystonejs/keystone/blob/master/packages/adapter-knex/package.json"knex": "^0.20.6"
=>"knex": "^0.21.1"
"pg": "^7.17.0"
=>"pg": "^8.0.3"
There are a number of changes detailed here for 7.x to 8.x - https://node-postgres.com/announcements, but it looks like the only large one is:
Temporary fix
Using yarn resolutions to force versions on
node:14.x
:The text was updated successfully, but these errors were encountered: