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
Issue:
pgtools fails to return a status when run.
This happens in cli and programmatic use.
Reproduce problem:
Using node v14.14.0, postgres v13.0
Attempt to connect with an invalid configuration or with a valid configuration. In both cases, nothing is returned. The callbacks are ignored, no errors or notice of success is displayed.
I've tested that this problem does not occur in node v12.18.3, postgres v12.4
I suspect that this is an issue with node v14.
A similar issue seems to be happening in sequelize/sequelize#12158
What seemed to work there was updating the pg dependency.
Solution:
This is what @sohel-ahmed-ansari proposes #21, which solves this issue.
I've tested that solution on node v14.14.0 and I only did simple tests but it seems to work properly.
How I tested that:
npm install npm-force-resolutions
add to package.json "resolutions": { "pg": "8.4.0", "pg-connection-string": "2.4.0" }
and new npm script "preinstall": "npx npm-force-resolutions"
Source: https://stackoverflow.com/a/62956076
To avoid this workaround, one can also do manually what pgtools does: use pg directly, connecting to a default database first.
The text was updated successfully, but these errors were encountered:
Issue:
pgtools fails to return a status when run.
This happens in cli and programmatic use.
Reproduce problem:
Using node v14.14.0, postgres v13.0
Attempt to connect with an invalid configuration or with a valid configuration. In both cases, nothing is returned. The callbacks are ignored, no errors or notice of success is displayed.
I've tested that this problem does not occur in node v12.18.3, postgres v12.4
I suspect that this is an issue with node v14.
A similar issue seems to be happening in sequelize/sequelize#12158
What seemed to work there was updating the pg dependency.
Solution:
This is what @sohel-ahmed-ansari proposes #21, which solves this issue.
I've tested that solution on node v14.14.0 and I only did simple tests but it seems to work properly.
How I tested that:
"resolutions": { "pg": "8.4.0", "pg-connection-string": "2.4.0" }
and new npm script
"preinstall": "npx npm-force-resolutions"
Source: https://stackoverflow.com/a/62956076
To avoid this workaround, one can also do manually what pgtools does: use pg directly, connecting to a default database first.
The text was updated successfully, but these errors were encountered: