Mongoose throws `Field is not in schema` error when defining a field twice Mongoose throws `Field is not in schema` error when defining a field twice mongoose mongoose

Mongoose throws `Field is not in schema` error when defining a field twice


This issue seems to be a bug in Mongoose. The issue is fixed and will be released in Mongoose 3.8.24 according to this link:

https://github.com/LearnBoost/mongoose/issues/2665