Description
- Version: v10.4.0
- Platform: Linux pascal 4.17.0-1-ARCH deps: update openssl to 1.0.1j #1 Mon Jun 4 20:39:17 UTC 2018 x86_64 GNU/Linux
internal/fs/utils.js:353
throw err;
^RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 && <= 0. Received 0
at Object.fs.readSync (fs.js:626:3)
at Object. (/home/arthur/serialkeys/dbtest/getkeys.js:11:14)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
I am trying to read a file and I am getting error when trying to read at beginning. As seen above, it says offset must be >= 0 and <= 0. It is very interesting error message i must say. Anyway I am using offset 0 and I get that error :-). I am just trying to read 10 bytes into an Uint8Array. Here is the call
let string = new Uint8Array();
let num = fs.readSync(keyfile, string, 0, 10, 0)
Activity