-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
pg.native – return null if pg-native is missing #950
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
Conversation
`require('pg').native` will be `null` and report error once to `stdout` when `pg-native` is missing.
It would solve the biggest part of the issue, crashing the app, but would still mean that an error message is logged to the console, without the user knowing why - "But I'm not accessing the |
@janmeier Because something (babel in this case?) accessing Message is shown only once when Any suggestions welcomed! |
Is there a better solution for this being worked on? I am not using pg-native and am running into this issue in CI. I would prefer this solution over having to unnecessarily configure pg-native in CI. |
@anthonyjspoerl There is PR #952 which hide property from Babel by making property nonenumerable. |
Dang sorry I missed this! I've been in the weeds with other things in my life for a while, getting out now finally. 💃 I'll go through the PRs and see which ones break backwards compatibility, clump them up, merge them, and push a new major version. I consider this a backwards break since someone somewhere might be depending weirdly on it throwing an exception. |
All libraries that rely on At the moment, the exception thrown is the only pointer that In all, this would be a breaking change (not that I'm against it) ;) |
Bump! Using knex.js and Node 6 and receiving error. Advice for a patch in the mean time? |
I think this is good choice. Thanks! |
require('pg').native
will benull
and report error once tostdout
whenpg-native
is missing.Fixes #838