Skip to content

leetcode.solution - JSON parse error #9

Closed
@jveitchmichaelis

Description

@jveitchmichaelis

Installed fine, but running the example given:

$ leetcode show 1 --solution
undefined:1
<!DOCTYPE html>
^

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/solution.discuss.js:54:21)
    at Request.self.callback (/usr/local/lib/node_modules/leetcode-cli/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (/usr/local/lib/node_modules/leetcode-cli/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/leetcode-cli/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1101:12)

Seems like it's an error in parse and it doesn't like the doctype.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions