"Class constructor ObjectId cannot be invoked without 'new'" - on upgrading from 6x to 7x - not in upgrade notes #14020
Labels
docs
This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone
Prerequisites
Issue
I am upgrading from 6x to 7x and started to get this issue
Class constructor ObjectId cannot be invoked without 'new'
Running the same code on mongoose@6.7.2 works and on mongoose@7.0.0 or mongoose@7.6.4 (latest as the day of this issue) it throws this new error:
This change is not mentioned on the migration guide:
https://mongoosejs.com/docs/migrating_to_7.html
The text was updated successfully, but these errors were encountered: