Closed
Description
Related to sequelize/sequelize#5438 and sequelize/sequelize#5476.
var pg = require('pg')
_.clone(pg);
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 the native
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
Metadata
Metadata
Assignees
Labels
No labels