Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: client.ref is not a function #2584

Closed
ellagwithington opened this issue Jul 27, 2021 · 6 comments
Closed

Error: client.ref is not a function #2584

ellagwithington opened this issue Jul 27, 2021 · 6 comments

Comments

@ellagwithington
Copy link

ellagwithington commented Jul 27, 2021

Hello,
We use pg in our project, which has a pg-pool dependency such that every time we build a new docker container, it gets the latest version of pg-pool. This afternoon, when running a new container, it appears that the addition of the ref method in "Allow Node to exit if the pool is idle (#2568)" seems to be causing the project to fail with no changes to our code. In cloud run I get this error:
screen_shot_2021-07-27_at_3 29 21_pm


There is no way to default to an earlier version of pg-pool within the project, so I was hoping I could get some help fixing this issue.
Thank You!

@brianc
Copy link
Owner

brianc commented Jul 27, 2021

yeah...sorry about that

#2582
#2583

should have a fix out in a few min

@fluggo
Copy link
Contributor

fluggo commented Jul 27, 2021

@brianc Didn't the pg-pool package depend on the version of pg with the ref/unref methods added?

@brianc brianc closed this as completed in 86d31a6 Jul 27, 2021
@brianc
Copy link
Owner

brianc commented Jul 27, 2021

@fluggo kinda - pg-pool doesn't depend on pg, pg depends on pg-pool (i know...) and pg's dep allows semver minor floating. So if you have an old version of pg installed at exactly 8.6 it'll install the latest semver minor pg-pool which requires client.ref to exist. Kinda weird peer dependency issue. Publishing a new semver patch of pg-pool will make it work w/ older versions of node-postgres.

@ellagwithington
Copy link
Author

Thanks!

@brianc
Copy link
Owner

brianc commented Jul 27, 2021

thank you for your patience! Takes a bit to push a patch because i wait for tests to run

@brianc
Copy link
Owner

brianc commented Jul 27, 2021

k released new semver patch of pg-pool which should work with much older versions of pg - sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants