来自版本7的Node.js具有异步/等待语法糖来处理承诺,现在在我的代码中,以下警告经常出现:rejection (rejection id: 1): ReferenceError: Error: Can't set headers
after they are sent.(node:11057) DeprecationWarning: Unhandled</em
query"})}(node:7844) UnhandledPromiseRejectionWarning: Errorpromise rejection.This error originated either by throwing inside of an async function without a catch block, or by rejectingTo terminate the node process on <em
');
const { error } = userValidation(req.body);
//if the req.body didn't passTo terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejecttps(rejection id