작성
·
201
0
Error: Blog validation failed: comments.blog: Path `comments.blog` is required., comments.user: Path `comments.user` is required., comments.content: Path `comments.content` is required. at ValidationError.inspect (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/error/validation.js:48:26) at formatValue (node:internal/util/inspect:782:19) at inspect (node:internal/util/inspect:347:10) at formatWithOptionsInternal (node:internal/util/inspect:2167:40) at formatWithOptions (node:internal/util/inspect:2029:10) at console.value (node:internal/console/constructor:324:14) at console.log (node:internal/console/constructor:360:61) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/src/routes/blogRoute.js:26:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errors: { 'comments.blog': ValidatorError: Path `comments.blog` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.blog', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true }, 'comments.user': ValidatorError: Path `comments.user` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.user', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true }, 'comments.content': ValidatorError: Path `comments.content` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.content', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true } }, _message: 'Blog validation failed' }
답변