DEP0185:在没有使用 new 的情况下实例化 node:repl 类


🌐 DEP0185: Instantiating node:repl classes without new

类型:寿命终止

🌐 Type: End-of-Life

不使用 new 限定符实例化由 node:repl 模块导出的类已被弃用。必须改为使用 new 限定符。这适用于所有 REPL 类,包括 REPLServerRecoverable

🌐 Instantiating classes without the new qualifier exported by the node:repl module is deprecated. The new qualifier must be used instead. This applies to all REPL classes, including REPLServer and Recoverable.

提供自动迁移 (source):

🌐 An automated migration is available (source):

npx codemod@latest @nodejs/repl-classes-with-new