_.cloneDeep with sequelize object
See original GitHub issueHi,
I’m trying to _.cloneDeep
the sequelize object and receive the next:
Unhandled rejection Error: Cannot find module 'pg-native'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/pavelp/Sites/xxx/node_modules/pg/lib/native/index.js:1:76)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at null.<anonymous> (/Users/pavelp/Sites/xxx/node_modules/pg/lib/index.js:78:36)
at forOwn (/Users/pavelp/Sites/xxx/node_modules/lodash/dist/lodash.js:2105:32)
at baseClone (/Users/pavelp/Sites/xxx/node_modules/lodash/dist/lodash.js:816:33)
at /Users/pavelp/Sites/xxx/node_modules/lodash/dist/lodash.js:817:23
at forOwn (/Users/pavelp/Sites/xxx/node_modules/lodash/dist/lodash.js:2105:15)
Thought it has something in common with https://github.com/sequelize/sequelize/issues/3781 , but I’ve updated the sequelize to 3.2.0 and the issue is still there.
Any hint if it is something I can fix?
Regards,
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Deep copy Node JS object without reference - Stack Overflow
_.clone only creates a shallow clone of the Object. Try _.cloneDeep .
Read more >Methods for deep cloning objects in JavaScript - LogRocket Blog
There are several ways to shallow clone objects in JavaScript, but deep cloning objects is trickier. We highlight several methods to do so....
Read more >How Deep Cloning Objects in JavaScript Works - DigitalOcean
A quick breakdown on how to clone an object in JavaScript the right way through deep cloning using Lodash.
Read more >node-npmtest-sequelize/sequelize/lib/ » sequelize.js
See sequelize.define for options * @param {Object} ... cloneDeep(globalOptions.define), options); } options = Utils.merge({ name: { plural: ...
Read more >Possible to use one model on clones of a table?
Where each table is just a clone of the original model. Is there any way I can create just one Sequelize model where...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For those who might me interested.
for me it was enough to do the next:
@mickhansen
Thanks,