DEP0018:未处理的 promise 拒绝
\DEP0018: Unhandled promise rejections
版本历史
| 版本 | 变更 |
|---|---|
| v15.0.0 | 生命尽头。 |
| v7.0.0 | 运行时弃用。 |
类型:生命结束
\Type: End-of-Life
未处理的 promise 拒绝已弃用。默认情况下,未处理的 promise 拒绝会以非零退出代码终止 Node.js 进程。要更改 Node.js 处理未处理拒绝的方式,请使用 --unhandled-rejections 命令行选项。
\Unhandled promise rejections are deprecated. By default, promise rejections
that are not handled terminate the Node.js process with a non-zero exit
code. To change the way Node.js treats unhandled rejections, use the
--unhandled-rejections command-line option.