RangeError: Invalid typed array length: -4095


#1

I downloaded the developer rig (on macos 10.14.1), and made it through configuration and run. The rig loaded up in chrome (70.0.3538.110) and I began to create my first extension. However when I clicked save, I got an error “fs.copyFileSync is not a function”

That seemed to be tied to me running an older version of Node, so I upgraded to 11.2.0. However, after that, when I try to run “run” I get the following error, preventing the rig from loading again.

$ ./run 
yarn run v1.12.3**
$ cross-env HOST=localhost.rig.twitch.tv HTTPS=true node scripts/start.js    
Binding to HOST environment variable and DEFAULT_PORT:
localhost.rig.twitch.tv:3000**
Starting the development server...
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> (/Users/adam/Downloads/devrig/node_modules/handle-thing/lib/handle.js:120:12)
    at Stream.emit (events.js:187:15)
    at endReadableNT (/Users/adam/Downloads/devrig/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)

error Command failed with exit code 1.

Anyone else run into this?


#2

If anyone else runs into this, it looks like an issue tied to Node 11.x. I downgraded to 10.x and resolved the problem.


#3

Will try that and will let you know if that works.


#4

same issue as before again about the failing to compile.


#5

After downgrading. delete the node_modules folder and reinstall (start from the first setup instruction)

Some modules can build node version specifically