-
Notifications
You must be signed in to change notification settings - Fork 53
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] Error: Cannot find module 'github' #12
Comments
try to reinstall github plugin?
|
I have tried -D and then -i, nothing changed.
…On Wed, May 9, 2018, 10:22 AM skygragon ***@***.***> wrote:
try to reinstall github plugin?
leetcode plugin -i github
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aj0of1NcKBsjVUF0Svj7u90Izw5IuXJIks5twlLfgaJpZM4T2lfd>
.
|
The log shows you are missing a 3rd party library that leetcode-cli needed, which is called "github" as well. Please check if it exists or not:
Weird that |
I met the exact same problem. |
Fixed, need to use |
@cosmozhang which version of npm do u use? Newer versions should not require sudo any more. |
5.6 |
same error. npm 6.9 |
I solved this problem by using "sudo leetcode plugin -i github" |
:~/leetcode$ leetcode push 106.construct-binary-tree-from-inorder-and-postorder-traversal.153319531.notac.cpp -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: cpp.run=2017.07.29
[TRACE] inited plugin: cpp.run
[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: 106.construct-binary-tree-from-inorder-and-postorder-traversal.algorithms.json
/usr/local/lib/node_modules/leetcode-cli/node_modules/yargs/yargs.js:1100
else throw err
^
Error: Cannot find module 'github'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Plugin.plugin.submitProblem (/usr/local/lib/node_modules/leetcode-cli/lib/plugins/github.js:29: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
The text was updated successfully, but these errors were encountered: