Node-postgres: Node 14.0.0 - pg does not response

Created on 27 Apr 2020  Â·  6Comments  Â·  Source: brianc/node-postgres

Running a postgres locally

import { Pool } from 'pg';
const pool = new Pool({})

describe('check connexion', () => {
  it('should select 1', async () => {
    const result = await pg.query('SELECT 1 as hey');
    expect(result.rows[0]).toEqual({ hey: 1 });
  });
  afterAll(() => pg.end());
});

Fails with current node 14.0.0
Works on node 12.16.2.

Most helpful comment

This is fixed in [email protected]. If you see this happening pg>=8.0.3 please feel free to re-open this issue.

All 6 comments

Same error with me. I made a downgrade to solve this until get better solution

What version of pg are you using? We fixed this in [email protected]

https://github.com/brianc/node-postgres/pull/2171

On Sun, Apr 26, 2020 at 7:32 PM Tarcisio Bruni Rangel <
[email protected]> wrote:

Same error with me. I made a downgrade to solve this until get better
solution

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/brianc/node-postgres/issues/2180#issuecomment-619650168,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAMHIPGPRTM56I4T5LCY2LROTHANANCNFSM4MRN7P3Q
.

This is fixed in [email protected]. If you see this happening pg>=8.0.3 please feel free to re-open this issue.

Faced the same problem, ran the command 'npm update' and pg works now.

tfw when you spend 5 days on this and the fix was to upgrade... thanks for the fix and @edweis for reporting

Oh gosh. I lost 3 days on this problem because I thought it was related to networks in docker containers.
Solution worked.

Was this page helpful?
0 / 5 - 0 ratings