Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github plugin error: "TypeError: Cannot read property 'submitProblem' of undefined" #23

Open
S-W-Williams opened this issue Aug 30, 2018 · 2 comments

Comments

@S-W-Williams
Copy link

S-W-Williams commented Aug 30, 2018

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.

@skygragon
Copy link
Owner

@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?

@JustABeginning
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants