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

Node Version: 10.7.0 not supported #213

Closed
hadnazzar opened this issue Jul 18, 2018 · 7 comments
Closed

Node Version: 10.7.0 not supported #213

hadnazzar opened this issue Jul 18, 2018 · 7 comments

Comments

@hadnazzar
Copy link

hadnazzar commented Jul 18, 2018

Hello when i try to run with node 10.7.0 i get error.

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: shutdown ENOTCONN
    at ReadStream.Socket._final (net.js:369:25)
    at callFinal (_stream_writable.js:612:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

@hadnazzar hadnazzar changed the title Node Version: 10.7.0 not supported yet. Node Version: 10.7.0 not supported Jul 18, 2018
@angristan
Copy link

Version 10.0.0 is not affected. 10.1.0 to 10.7.0 are affected

@thecyberfranko
Copy link

Also Node Version 10.9.0 is affected with this issue. Any updates or workarounds on this?
screen shot 2018-09-03 at 3 01 35 pm

@Tesser4
Copy link

Tesser4 commented Sep 11, 2018

Same with node v10.10.0.
But in my case the error is 'shutdown EPIPE' instead of 'shutdown ENOTCONN'.

events.js:167
    throw er; // Unhandled 'error' event
    ^

Error: shutdown EPIPE
    at ReadStream.Socket._final (net.js:370:25)
    at callFinal (_stream_writable.js:612:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

@cristianberroeta
Copy link

Hi all,

I think I've been able to solve this issue:

  • bin/cmd.js is using the 'adventure' module.
  • In the adventure module, index.js is using its lib/menu.js file.
  • lib/menu.js has the following line near the end:
process.stdin.end();

That line seems to be the culprit. If you create a file only containing process.stdin.end();, you will get an error, when using node 10.1.0, but not when using node 10.0.0 (and it also fails for node 10.9.0 and 10.10.0, so it probably fails from 10.1.0 to 10.10.0).

By the way, I've just created an issue in the node repository.

So, in order to fix our issue, we could replace process.stdin.end(); with process.stdin.destroy();. I tested it using node 10.0.0, 10.1.0, 10.9.0 and 10.10.0 and it works.

The good thing is that if this fix works, it would be applied to the adventure repo, so it would fix the bug for every project that depends on it.

I hope someone else can check if this solution is correct. If so, I could raise a pull request.

Best wishes

@Tesser4
Copy link

Tesser4 commented Sep 12, 2018

Yeap, your solution @cristianberroeta just worked for me also, with Node v10.10.0.

@cristianberroeta
Copy link

Thanks @Tesser4,

I've just asked in the gitter nodeshool/workshoppers chat room if I should make a pull request.

@cristianberroeta
Copy link

I've just created the pull request in the adventure repository.

To clarify, once it is approved, we will have to create a pull request to update that 'adventure' module version number we depend on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants