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

Only works in node version 10.15.3, crashes on the latest version (11.14.0) #1

Closed
JamesGDiaz opened this issue Apr 14, 2019 · 2 comments
Assignees

Comments

@JamesGDiaz
Copy link

I set up the boilerplate on node version 11 and everything compiles and runs correctly, except until I click anything on the client, the server crashes with this error:

internal/buffer.js:788
class FastBuffer extends Uint8Array {}
^

RangeError: Invalid typed array length: -4095
at new Uint8Array ()
at new FastBuffer (internal/buffer.js:788:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:149:17)
at Stream. (/home/james/Desktop/confettibot-mern/server/node_modules/handle-thing/lib/handle.js:88:10)
at Stream.emit (events.js:198:15)
at endReadableNT (/home/james/Desktop/confettibot-mern/server/node_modules/readable-stream/lib/_stream_readable.js:1077:12)

This is a bug in V8 I think (see nodejs/node#24097)
But maybe there is something wrong in your code that fires this bug.

Thanks

@tamasszoke tamasszoke self-assigned this Apr 15, 2019
@tamasszoke
Copy link
Owner

tamasszoke commented Apr 15, 2019

I have checked the issue, it seems like the spdy module causes it, check this discussion. According to this, it won't be fixed, their suggestion is to use the native HTTP2 module instead, which is in Node v10+. But there's a catch, the HTTP module does not work with Express 4, see this discussion, it will be resolved only in Express 5.

According to this, if you want to use it with Node v11 you should use regular HTTP or HTTPS. Another option is to use the HTTP/HTTPS server with a NGINX HTTP2 proxy. With HTTP2, the recommended way is to use Node v10, at least until the Express 5 releases.

@JamesGDiaz
Copy link
Author

Thank you, I think we can close this issue.
By the way this boilerplate is amazing. It has saved me hours and hours of work. Thank you very much

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