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

Server crashes on starting #828

Closed
eafiontzi opened this issue Aug 9, 2022 · 2 comments
Closed

Server crashes on starting #828

eafiontzi opened this issue Aug 9, 2022 · 2 comments

Comments

@eafiontzi
Copy link

Environment Versions

  1. OS Type Windows
  2. Node version: $ node --version 12.14.0
  3. http-server version: $ http-server --version 14.1.1

Steps to reproduce

http-server

Expected result

Server starting successfully

Actual result

$ http-server
Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://153.89.58.106:8080
  http://192.168.1.12:8080
  http://127.0.0.1:8080
Hit CTRL-C to stop the server

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

Error: read EBADF
    at Pipe.onStreamRead (internal/stream_base_commons.js:201:27)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'EBADF',
  code: 'EBADF',
  syscall: 'read'
}

Have tried versions 13.0.2 and older ones like 0.12.3 (was working with 12.14.0 in my previous laptop). Also have tried changing port, same result either way.

I finally got it to work with node version 17.0.0 but my app does not support that version. Is there something I can change to get it to work with node version 12.14.0?

@zbynek
Copy link
Contributor

zbynek commented Aug 9, 2022

Does updating Node to anything lower than 17 help? Recent versions of http-server suffer from a bug with 12.15 that's not reproducible with Node 12.16

@eafiontzi
Copy link
Author

eafiontzi commented Aug 10, 2022

Thanks for your reply. Got it working with node 12.17.0 (12.6.* not working either). Thankfully my app supports that version. Thanks again.

Not sure how I bypassed that bug in my previous laptop with version 12.14.0 and older http-server version 0.12.3...

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

2 participants