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

breaking changes from pg 6.0.3 to 7 #18

Open
jasontenbrink opened this issue Sep 21, 2017 · 4 comments
Open

breaking changes from pg 6.0.3 to 7 #18

jasontenbrink opened this issue Sep 21, 2017 · 4 comments

Comments

@jasontenbrink
Copy link

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.

@jasontenbrink
Copy link
Author

hmmm. This may be because I installed pg independently from pg-query. This may not be an issue.

@jasontenbrink
Copy link
Author

doing some more investigating, it looks like this is a bug. pg-query won't work with pg7+

@ewan-sinclair
Copy link

I can confirm the same issue. Reverting pgto 6.2.3 fixes this problem.

@Lawrence-Sproul
Copy link

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")
}
}

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