Cannot read property '$isSingleNested' of undefined
See original GitHub issueI suspect this is an issue with mongoose. I just upgraded from 4.4.2 to 4.5.9 and I get the following error:
info: ERROR IN RECEIVE MIDDLEWARE: TypeError: Cannot read property '$isSingleNested' of undefined
I believe my code that’s causing the issue is:
Model.update({ _id: foo._id }, {
$inc: { "foo.bar.rofl": count },
$set: {
"foo.bar.last_message": Date.now(),
"foo.stix": err || "ok"
}
}, err => done(err));
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Mongoose Update error $isSingleNested - node.js
1 Answer 1 ... you cant set value directly. you need to set value to some field . you need to provide the...
Read more >TypeError: Cannot read property 'close' of undefined - MongoDB
I had this problem, I t changed the connectTimeoutMS variable in mongoclient.spec.js to 2000 (this is defined twice in the file. make sure...
Read more >cannot read properties of undefined (reading 'split') mongoose
Uncaught TypeError : Cannot read properties of undefined (reading 'split') at Object.<anonymous> (browser.umd.js:220) at Object.
Read more >Cannot read property 'data' of undefined - Prismic People
I always get this error whenever i try to integrate meta document `TypeError: /Users/desartist22/Desktop/floema/views/_includes/head.pug:21 ...
Read more >How to Avoid Getting 'Cannot read property of undefined' in ...
Learn how you can avoid getting the famous 'Cannot read property of undefined' error in JavaScript with the logical OR operator.
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
Same here, since
4.5.9
(4.5.8
is fine). Having a look at the changelog, the culprit might be https://github.com/Automattic/mongoose/issues/4369Duplicate of #4418, will push a fix tomorrow