-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
RangeError: Invalid typed array length #24097
Comments
I'm also seeing the same thing trying to start a react app with yarn.
|
I ran into the same error. It's not a total fix but downgrading my node version got me back up and running. Here's what I did: |
Pretty sure that message is coming from V8. Not sure if it's a bug in V8, or the result of a bug fix in V8, or neither... @nodejs/v8 |
cc @psmarshall |
fixed by removing all node folders, reinstalling nvm, reinstalling node |
Throwing when a typed array is constructed with a negative length argument is the correct behaviour according to the spec. I don't think we changed anything here recently, so the bug is most likely in node or one of the modules used |
Also seeing this starting in the last couple of days. Webpack will compile it okay, but once you make a request it collapses in on itself. Can get around the crash by going back to older node (10.6.0 worked okay), but that kinda has problems of its own.
|
Going by the stack trace, it's almost certainly a bug in the handle-thing module. I'm going to close this out as not-our-bug. Please report it to that module's maintainers. cc @indutny since you're one of its maintainers. If it helps, -4095 is libuv's EOF status code. |
upgrading react-scripts did the trick for my create-react-app without having to downgrade from node 11:
all better! |
why not try this one instead after you uninstall the node |
@kmiasko did you ever find a workaround? started getting this exact issue a few days back and just can't figure out what the fix is. |
Same problem. Webpack can't start or dying after the first request. Before that, I update node to 11.4. Maybe it's not a node bug but I have no idea how to detect problem package. node < 10.6 works well |
Yeah exact same thing here @webmcheck . Strangest thing is that this issue just popped out of nowhere. Didn't upgrade NPM or yarn or anything like that. |
@webmcheck @camus-code spdy-http2/handle-thing#5 (comment) That's the package that is causing problems. It's already fixed, but packages that use older version of this package won't work on node >= 11.1 (ie. angular 5.x fails, angular 7.x works ok). |
Ahhh okay. Thanks for the response @kmiasko . Ended up downgrading my node version and things are back to normal. |
I'm pretty sure spdy-http2/handle-thing#6 is the tracking issue for the NodeJS 11.x handle-thing fixes, not handle-thing#5, which was for NodeJS 10.x, but perhaps @jacobheun can confirm for certain the intent. |
@eyz that's correct. I recently got supported added for node LTS versions, but ran out of time to get updates in for node 11. Internal stream behavior changed in node 11 which caused the issue in handle-thing. handle-thing needs to be updated to account for those. |
Thanx to @damejia100, but instead of downgrading I've upgraded node to the latest stable version (10.15.3):
and the error has gone |
10.17.0 also works. |
As @eyz has mentioned problem indeed with the old
Also, I cannot use
tested with |
The following issue occurs with the current version of spdy: nodejs/node#24097
This solved my issue. |
After upgrading to node 11.1 webpack-dev-server (i assume) can't serve angular 5 app build with this error:
webpack: Compiled successfully.
buffer.js:72
class FastBuffer extends Uint8Array {}
^
RangeError: Invalid typed array length: -4095
at new Uint8Array (<anonymous>)
at new FastBuffer (buffer.js:72:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:121:17) at Stream.<anonymous>
(node_modules/handle-thing/lib/handle.js:120:12)
at Stream.emit (events.js:187:15) at endReadableNT
(node_modules/readable-stream/lib/_stream_readable.js:992:12)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
The text was updated successfully, but these errors were encountered: