nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.16k stars 29.37k forks source link

internal deprecation warning in REPL #37445

Open targos opened 3 years ago

targos commented 3 years ago
$ node
Welcome to Node.js v15.8.0.
Type ".help" for more information.
> process.kill(process.pid, 'SIGUSR1')
Debugger listening on ws://127.0.0.1:9229/5dea70fb-20d8-45a0-942b-a45d186fc3f5
For help, see: https://nodejs.org/en/docs/inspector
true
> (node:25150) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling  on process.)
    at emitMakeCallbackDeprecation (node:domain:129:13)
    at process.topLevelDomainCallback (node:domain:143:5)
    at process.callbackTrampoline (node:internal/async_hooks:130:14)
    at REPLServer.Interface._setRawMode (node:readline:344:43)
    at REPLServer.defaultEval (node:repl:521:18)
    at bound (node:domain:416:15)
    at REPLServer.runBound [as eval] (node:domain:427:12)
    at REPLServer.onLine (node:repl:836:10)
    at REPLServer.emit (node:events:390:22)
    at REPLServer.EventEmitter.emit (node:domain:470:12)
EladKeyshawn commented 3 years ago

@targos Hey, can I ask what can be done in this situation? Should the warning not be printed at all ?

targos commented 3 years ago

I'm not familiar with this part of the code, but I think the first thing we should try to do is avoid using the deprecated API.

EladKeyshawn commented 3 years ago

I'm not familiar with this part of the code, but I think the first thing we should try to do is avoid using the deprecated API.

Alright I'll take a look into it :)