[BUG] [5.12.7] Cannot create property '$isUnderneathDocArray' on string 'nested'
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
Cannot create property '$isUnderneathDocArray' on string 'nested'
If the current behavior is a bug, please provide the steps to reproduce.
run this script:
const { Schema } = require('mongoose')
const DynamicTextMatchFeaturesSchema = new Schema({
css: { color: String },
})
const PossibleElementsArraySchema = {
type: [
{
textMatchFeatures: {
dynamic: { type: DynamicTextMatchFeaturesSchema },
},
},
],
}
const ElementSchema = new Schema({ image: { type: String } })
const possibleElementsStrategy = {
possibleElements: PossibleElementsArraySchema,
}
ElementSchema.add(possibleElementsStrategy)
What is the expected behavior?
To not print this message
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that “latest” is not a version. Node 14.15.1 Mongoose 5.12.7 it is working fine with 5.12.5 but not 5.12.7
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Cannot create property on string - javascript - Stack Overflow
I had a similar error message TypeError: Cannot create property 'false' on boolean 'false' in Node 14.3.0 (ES 2019), using the new Javascript...
Read more >TypeError: Cannot create property 'stack' on string 'Forbidden'
Dear All,. I am newbie in Moodle, I have a issue "TypeError: Cannot create property 'stack' on string 'Forbidden' in Dashboard page.
Read more >mongoose | Yarn - Package Manager
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose supports Node.js and Deno (alpha). Build Status NPM...
Read more >TypeError: can't assign to property "x" on "y": not an object
In strict mode, a TypeError is raised when attempting to create a property on primitive value such as a symbol, a string, a...
Read more >Cannot create property 'path' on string 'required'
I made sure to create an environmental variable called 'path', as per the tutorial, but I can't seem to pass this error. The...
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
I can confirm too.
@IslandRhythms you don’t even need to actually connect to a database for the bug to occur