skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 457 forks source link

Cannot use submit command #97

Closed zhouchenzc0824 closed 6 years ago

zhouchenzc0824 commented 6 years ago

Problem Summary

Cannot use SUBMIT command

How to reproduce

leetcode submit [problem_file]

[cz@local]$leetcode submit 144.binary-tree-preorder-traversal.java -vv
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] inited plugin: cache
[TRACE] found plugin: company=2017.12.18
[TRACE] inited plugin: company
[TRACE] found plugin: github=2018.03.24
[TRACE] inited plugin: github
[TRACE] found plugin: leetcode=default
[TRACE] inited plugin: leetcode
[TRACE] found plugin: retry=default
[TRACE] inited plugin: retry
[TRACE] found plugin: solution.discuss=2018.04.14
[TRACE] inited plugin: solution.discuss
[TRACE] missing plugins: 0
[DEBUG] cache hit: problems.json
[DEBUG] cache hit: 144.binary-tree-preorder-traversal.algorithms.json
/usr/local/lib/node_modules/leetcode-cli/node_modules/yargs/yargs.js:1100
      else throw err
           ^

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined
    at Url.parse (url.js:143:11)
    at Object.urlParse [as parse] (url.js:137:13)
    at Plugin.plugin.submitProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/github.js:20:19)
    at /usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:58:10
    at /usr/local/lib/node_modules/leetcode-cli/lib/plugins/solution.discuss.js:81:45
    at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:38:12)
    at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/solution.discuss.js:80:15)
    at /usr/local/lib/node_modules/leetcode-cli/lib/core.js:95:15
    at /usr/local/lib/node_modules/leetcode-cli/lib/plugins/company.js:1176:12
    at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:21:12)

Environment

skygragon commented 6 years ago

duplicated to https://github.com/skygragon/leetcode-cli-plugins/issues/13