Whenever I try to start Strapi using this template with Custom Config and MongoDB, I receive an error about objectID fields.
Error: global validation failed: _id: Cast to ObjectId failed for value "1" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:185:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "1" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"1"',
messageFormat: undefined,
kind: 'ObjectId',
value: 1,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'global validation failed'
}
Error: global validation failed: _id: Cast to ObjectId failed for value "2" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:185:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "2" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"2"',
messageFormat: undefined,
kind: 'ObjectId',
value: 2,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'global validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "1" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "1" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"1"',
messageFormat: undefined,
kind: 'ObjectId',
value: 1,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "2" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "2" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"2"',
messageFormat: undefined,
kind: 'ObjectId',
value: 2,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "3" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "3" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"3"',
messageFormat: undefined,
kind: 'ObjectId',
value: 3,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "4" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "4" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"4"',
messageFormat: undefined,
kind: 'ObjectId',
value: 4,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "5" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "5" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"5"',
messageFormat: undefined,
kind: 'ObjectId',
value: 5,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "6" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "6" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"6"',
messageFormat: undefined,
kind: 'ObjectId',
value: 6,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "7" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "7" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"7"',
messageFormat: undefined,
kind: 'ObjectId',
value: 7,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}
Error: page validation failed: _id: Cast to ObjectId failed for value "8" at path "_id"
at ValidationError.inspect (/home/danilo/projects/app/node_modules/mongoose/lib/error/validation.js:47:26)
at formatValue (internal/util/inspect.js:743:19)
at inspect (internal/util/inspect.js:317:10)
at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
at formatWithOptions (internal/util/inspect.js:1858:10)
at console.value (internal/console/constructor.js:323:14)
at console.log (internal/console/constructor.js:358:61)
at createEntry (/home/danilo/projects/app/config/functions/bootstrap.js:93:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /home/danilo/projects/app/config/functions/bootstrap.js:170:5 {
errors: {
_id: CastError: Cast to ObjectId failed for value "8" at path "_id"
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:269:11)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Function.create (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:3022:10) {
stringValue: '"8"',
messageFormat: undefined,
kind: 'ObjectId',
value: 8,
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/danilo/projects/app/node_modules/bson/lib/bson/objectid.js:59:11)
at castObjectId (/home/danilo/projects/app/node_modules/mongoose/lib/cast/objectid.js:25:12)
at ObjectId.cast (/home/danilo/projects/app/node_modules/mongoose/lib/schema/objectid.js:267:12)
at ObjectId.SchemaType.applySetters (/home/danilo/projects/app/node_modules/mongoose/lib/schematype.js:1075:12)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1250:20)
at model._handleIndex (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:1019:14)
at model.$set (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:960:22)
at model.Document (/home/danilo/projects/app/node_modules/mongoose/lib/document.js:150:12)
at model.Model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:106:12)
at new model (/home/danilo/projects/app/node_modules/mongoose/lib/model.js:4686:15)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3052:22
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3088:7
at Array.forEach (<anonymous>)
at /home/danilo/projects/app/node_modules/mongoose/lib/model.js:3087:15
at /home/danilo/projects/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
}
},
_message: 'page validation failed'
}