-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cloning the library throws error when pg-native is not installed #945
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
Comments
Hey @janmeier - I would definitely appreciate a PR for this issue! Sounds like a pretty annoying bug and also not a super difficult fix! As far as where to put the tests - if a test actually needs a postgres instance running I put it under Does that make sense? basically:
If you want to run all the unit tests (including the new one you added) you can type Hope that helps! |
Thanks for the thorough contribution guide! ;) |
+1 |
1 similar comment
+1 |
@janmeier any plan of opening a PR here with your fork ? I have the same issue and your fork seems to resolve it :) |
@janmeier you are right, I thought the opposite because of the remaining |
Related to sequelize/sequelize#5438 and sequelize/sequelize#5476.
Throws
Error: Cannot find module 'pg-native'
Wanting to clone the library directly doesn't make much sense, but in the issues linked above, it happens because a sequelize model, which has a reference to pg is being deeply cloned.
This should be fixable by switching to
defineProperty
and marking thenative
property as non-enumerable.I can write up a PR later today if you'd like - I just need a hint as to where to put the test
The text was updated successfully, but these errors were encountered: