leetcode-cli-plugins
leetcode-cli-plugins copied to clipboard
Github plugin error: "TypeError: Cannot read property 'submitProblem' of undefined"
When I try to submit a solution I am getting the following error from the github plugin:
/usr/local/lib/node_modules/leetcode-cli/node_modules/yargs/yargs.js:1100
else throw err
^
TypeError: Cannot read property 'submitProblem' of undefined
at Plugin.plugin.(anonymous function) [as submitProblem] (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/retry.js:56:11)
at Plugin.plugin.submitProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/github.js:39:15)
at /usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:58:10
at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:38:12)
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:1179:12
at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:21:12)
at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/company.js:1167:15)
at Plugin.core.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/core.js:87:8)
at Object.cmd.handler (/usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:53:8)
I am on npm version 5.6. I also ran into this problem before, but solved it with sudo. However after solving that issue, this one persists.
@S-W-Williams the latest npm should not require sudo. If not, things might get messed somewhere. A clean reinstall of leetcode-cli might give a help?
When I try to submit a solution I am getting the following error from the github plugin:
/usr/local/lib/node_modules/leetcode-cli/node_modules/yargs/yargs.js:1100 else throw err ^ TypeError: Cannot read property 'submitProblem' of undefined at Plugin.plugin.(anonymous function) [as submitProblem] (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/retry.js:56:11) at Plugin.plugin.submitProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/github.js:39:15) at /usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:58:10 at Plugin.plugin.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:38:12) 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:1179:12 at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/cache.js:21:12) at Plugin.plugin.getProblems (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/company.js:1167:15) at Plugin.core.getProblem (/usr/local/lib/node_modules/leetcode-cli/lib/core.js:87:8) at Object.cmd.handler (/usr/local/lib/node_modules/leetcode-cli/lib/commands/submit.js:53:8)I am on npm version 5.6. I also ran into this problem before, but solved it with sudo. However after solving that issue, this one persists.
You can check out github_fix branch of my fork.