intelephense-docs
intelephense-docs copied to clipboard
Crashes due to unhandled promise rejection on Node v15+ when using Eglot
I'm currently using Intelephense with Eglot and installing it globally with Volta. It immediately crashes on startup when installed using Node v15 and up due to the new default mode for unhandledRejection. When running it with v14, it otherwise works, but I get the following output on stderr (full path truncated to $VOLTA_HOME):
(node:65203) UnhandledPromiseRejectionWarning: Error: Internal error
at $VOLTA_HOME/tools/image/packages/intelephense/lib/node_modules/intelephense/lib/intelephense.js:2:7062058
at $VOLTA_HOME/tools/image/packages/intelephense/lib/node_modules/intelephense/lib/intelephense.js:2:7062352
at Immediate.<anonymous> ($VOLTA_HOME/tools/image/packages/intelephense/lib/node_modules/intelephense/lib/intelephense.js:2:7062714)
at processImmediate (internal/timers.js:464:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:65203) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:65203) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Is this a problem with Eglot, or is Node v14 the max supported version?