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

Node version 14 exists without error on pool.query #2226

Closed
ghost opened this issue May 22, 2020 · 5 comments
Closed

Node version 14 exists without error on pool.query #2226

ghost opened this issue May 22, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented May 22, 2020

const { Pool } = require('pg')
    const pool = new Pool({
        ssl: {
            rejectUnauthorized: false,
        }
    })
const na = await pool.query( "text " ).then( .. ).catch( .. )
console.log(' this line never prints ')

On node version 14, the process exits without printing any connection error(s), but on node 12 it works as expected.

@charmander
Copy link
Collaborator

Which version of pg are you using?

@charmander charmander transferred this issue from brianc/node-postgres-docs May 22, 2020
@ghost
Copy link
Author

ghost commented May 23, 2020

pg version 7.18.2

I wondered if it is related to the nodejs issue nodejs/node#22088 which could imply that pg creates a promise, but never calls the resolve or reject on it.

@charmander
Copy link
Collaborator

charmander commented May 23, 2020

pg ≤ 8.0.2 doesn’t support Node 14. Please upgrade to pg 8.2.1.

@charmander
Copy link
Collaborator

Duplicate of #2181

@charmander charmander marked this as a duplicate of #2181 May 23, 2020
@ghost
Copy link
Author

ghost commented May 25, 2020

Thank you :)

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

1 participant