Skip to content

Failed to run 'leetcode stat -c' (leetcode-cli/node_modules/yargs/yargs.js:1148 else throw err ^ RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 100.28571428571429) #168

Open
@indestinee

Description

@indestinee

Problem Summary

failed to run 'leetcode stat -c'; but ok with 'leetcode stat -g'

How to reproduce

1. which command failed, what parameters used

leetcode stat -c

2. actual/expected output

/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1148
else throw err
^

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 100.28571428571429
at Buffer.write (buffer.js:897:5)
at showCal (/Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:171:21)
at /Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:218:24
at /Users/indestinee/Code/GitHub/leetcode-cli/lib/core.js:79:12
at Plugin.plugin.getProblems (/Users/indestinee/Code/GitHub/leetcode-cli/lib/plugins/cache.js:16:12)
at Plugin.core.filterProblems (/Users/indestinee/Code/GitHub/leetcode-cli/lib/core.js:62:8)
at Object.cmd.handler (/Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:210:8)
at Object.runCommand (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1063:30)
at Object.get [as argv] (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1004:21)

3. if possible, run command with "-vv" will give more outputs of the HTTP data, do REMEMBER to delete your cookies before paste here!!

$ leetcode stat -c -vv
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] found plugin: leetcode=default
[TRACE] found plugin: retry=default
[TRACE] inited plugin: leetcode
[TRACE] inited plugin: retry
[TRACE] inited plugin: cache
[DEBUG] cache hit: problems.json

/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1148
else throw err
^

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be an integer. Received 100.28571428571429
at Buffer.write (buffer.js:897:5)
at showCal (/Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:171:21)
at /Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:218:24
at /Users/indestinee/Code/GitHub/leetcode-cli/lib/core.js:79:12
at Plugin.plugin.getProblems (/Users/indestinee/Code/GitHub/leetcode-cli/lib/plugins/cache.js:16:12)
at Plugin.core.filterProblems (/Users/indestinee/Code/GitHub/leetcode-cli/lib/core.js:62:8)
at Object.cmd.handler (/Users/indestinee/Code/GitHub/leetcode-cli/lib/commands/stat.js:210:8)
at Object.runCommand (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1063:30)
at Object.get [as argv] (/Users/indestinee/Code/GitHub/leetcode-cli/node_modules/yargs/yargs.js:1004:21)

Environment

  • leetcode-cli version: 2.6.1-8dc0b2a
  • OS version: MacOS Mojave 10.14.5
  • Node version: v12.4.0
  • Npm version: 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions