const userSchema = mongoose.Schema({ movies_ids: Array })
When specifying the field as "Array", I get this error:
const arraySchema = Array.isArray(value) ? value[0] : value.type[0];
^
TypeError: Cannot read properties of undefined (reading '0')
But if you specify so, then everything works
const userSchema = mongoose.Schema({ movies_ids: [] })