Skip to content

Minimal example to reproduce error: Listeners for `uncaughtException` cannot be used in the REPL

Notifications You must be signed in to change notification settings

vladnds/firebase-error-no-listeners-node-14

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository to reproduce error registering error handler

This issue appeared after upgrading functions from node 10 to node 14. Cannot use Sentry because of it - it registers uncaughtException handlers.

To reproduce issus:

  1. Run functions shell
npm run build
firebase functions:shell --project <specify you project id here>
  1. Add some uncaught exception handler
process.on("uncaughtException", function(err) {
    console.error("uncaughtException");
})
  1. See error:
Uncaught:
TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException` cannot be used in the REPL
    at process.<anonymous> (repl.js:309:15)
    at process.emit (events.js:387:35)
    at _addListener (events.js:418:14)
    at process.addListener (events.js:466:10)
    at REPL7:1:9
    at Script.runInContext (vm.js:144:12)
    at REPLServer.defaultEval (repl.js:488:29)
    at bound (domain.js:416:15)
    at REPLServer.runBound [as eval] (domain.js:427:12)
    at REPLServer.onLine (repl.js:819:10)
    at REPLServer.emit (events.js:375:28)
    at REPLServer.emit (domain.js:470:12)
    at REPLServer.Interface._onLine (readline.js:364:10)
    at REPLServer.Interface._line (readline.js:700:8)
    at REPLServer.Interface._ttyWrite (readline.js:1045:14)
    at REPLServer.self._ttyWrite (repl.js:912:9) {
  code: 'ERR_INVALID_REPL_INPUT'
}

About

Minimal example to reproduce error: Listeners for `uncaughtException` cannot be used in the REPL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published