Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError when tab-completing constructor in REPL #6181

Closed
benkogan opened this issue Apr 13, 2016 · 5 comments
Closed

Uncaught TypeError when tab-completing constructor in REPL #6181

benkogan opened this issue Apr 13, 2016 · 5 comments
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@benkogan
Copy link

  • Version: v5.7.0
  • Platform: Mac OS X 10.10.4
  • Subsystem: REPL

The repl throws an uncaught error when trying to tab-complete the constructor keyword:

> class Foo {
... construcrepl.js:292
    top.outputStream.write((e.stack || e) + '\n');
       ^

TypeError: Cannot read property 'outputStream' of undefined
    at Domain.<anonymous> (repl.js:292:8)
    at emitOne (events.js:90:13)
    at Domain.emit (events.js:182:7)
    at emitError (domain.js:66:24)
    at Domain.errorHandler [as _errorHandler] (domain.js:110:18)
    at process._fatalException (node.js:255:33)

@bnoordhuis
Copy link
Member

Does it still happen with the latest v5? It works for me with master, FWIW

@bnoordhuis bnoordhuis added repl Issues and PRs related to the REPL subsystem. unconfirmed labels Apr 13, 2016
@benkogan
Copy link
Author

Sorry, didn't realize my node version was out of date. Tried with v5.10.1 and still getting the same issue:

$ node -v
v5.10.1
$ node
> class Foo {
... consrepl.js:303
    top.outputStream.write((e.stack || e) + '\n');
       ^

TypeError: Cannot read property 'outputStream' of undefined
    at Domain.<anonymous> (repl.js:303:8)
    at emitOne (events.js:90:13)
    at Domain.emit (events.js:182:7)
    at emitError (domain.js:66:24)
    at Domain.errorHandler [as _errorHandler] (domain.js:110:18)
    at process._fatalException (node.js:233:33)

@cjihrig
Copy link
Contributor

cjihrig commented Apr 13, 2016

Seems to be working for me with the master branch:

> class Foo {
... cons
const        

console      

constructor  

... const
const        

constructor  

... constructor(){
..... }
... }
[Function: Foo]

The fix likely happened in a semver major change that hasn't been released yet.

@benkogan
Copy link
Author

Got it. I'll go ahead and close this, thanks!

@ghost
Copy link

ghost commented Sep 27, 2016

what was the solution for this? getting same error.

TypeError: Cannot read property 'outputStream' of undefined
at Domain. (repl.js:296:8)
at emitOne (events.js:77:13)
at Domain.emit (events.js:169:7)
at emitError (domain.js:66:24)
at Domain.errorHandler as _errorHandler
at process._fatalException (node.js:221:33)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants