Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Does not work on Windows #20

Open
kvnloughead opened this issue Feb 8, 2020 · 1 comment
Open

Does not work on Windows #20

kvnloughead opened this issue Feb 8, 2020 · 1 comment

Comments

@kvnloughead
Copy link

I am using WSL, but it seems like this issue is more general for Windows. Installation works, and the first run of locus appears to work fine as well. However, after exiting, all subsequent calls to locus produce something like this

File : /home/kloughead/projects/API_demo/app.js @ line: 12

     6: const request = require('request');
     7: require('locus');
     8: 
     9: 
    10: request('https://jsonplaceholder.typicode.com/users/1', function(error, response, body) {
    11:     if (!error && response.statusCode == 200) {
 => 12:         eval(locus)
    13:         var parsedData = JSON.parse(body);
    14:         console.log(parsedData);
    15:     }

internal/fs/streams.js:59
    throw new ERR_OUT_OF_RANGE(name, '>= 0 and <= 2 ** 53 - 1', pos);
    ^

RangeError [ERR_OUT_OF_RANGE]: The value of "start" is out of range. It must be >= 0 and <= 2 ** 53 - 1. Received -25580
    at checkPosition (internal/fs/streams.js:59:11)
    at new ReadStream (internal/fs/streams.js:115:5)
    at Object.createReadStream (fs.js:1835:10)
    at onLoad (/home/kloughead/projects/API_demo/node_modules/readline-history/readline-history.js:55:25)
    at ReadStream.onend (/home/kloughead/projects/API_demo/node_modules/readline-history/readline-history.js:48:21)
    at ReadStream.emit (events.js:333:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
    at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:66:3)
    at Function.module.exports.loopWhile (/home/kloughead/projects/API_demo/node_modules/deasync/index.js:70:11) {
  code: 'ERR_OUT_OF_RANGE'
}

I am taking a course on Udemy and there are others having similar issues. We were told by the teaching assistant to try installing version 2.0.0, but that fails also. Installation works, all calls stop just for the interactive portion. That is, you see something like this:

     6: const request = require('request');
     7: require('locus');
     8: 
     9: 
    10: request('https://jsonplaceholder.typicode.com/users/1', function(error, response, body) {
    11:     if (!error && response.statusCode == 200) {
 => 12:         eval(locus)
    13:         var parsedData = JSON.parse(body);
    14:         console.log(parsedData);
    15:     }

$
@bohdan-s-ua
Copy link

What version of locus are you using? I was on 2.0.4 and faced the same problem. Installing 2.0.3 helped me and now it works just fine - hope it'll help you too. Good luck!

laseryuan added a commit to laseryuan/locus that referenced this issue Oct 30, 2023
laseryuan added a commit to laseryuan/locus that referenced this issue Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants