breaking changes from pg 6.0.3 to 7
I get this error when on the later version
TypeError: (query.pg || pg).connect is not a function at module.exports (/Users/Freddy/project/node_modules/pg-query/index.js:48:20)
switching back to 6.0.3 fixes the issue.
hmmm. This may be because I installed pg independently from pg-query. This may not be an issue.
doing some more investigating, it looks like this is a bug. pg-query won't work with pg7+
I can confirm the same issue. Reverting pgto 6.2.3 fixes this problem.
This seems to fix the issue. I am doing some more testing though:
try { const { Pool } = require('pg'); var pg = new Pool(); //var pg = require('pg'); } catch(e) { try { const { Pool } = require('pg'); var pg = new Pool(); //var pg = require('pg.js'); } catch(e) { throw new Error("Could not require pg or pg.js - please install one or the other") } }