-
Notifications
You must be signed in to change notification settings - Fork 664
fail to install plugin #593
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
Comments
I meet the similar problem yesterday, the error is 404, but I go through plugins installation, I meet 404 when list questions in leetcode-cli, it should be related to your vpn or shadowsocks, finally I didn't solve it. Now I use the leetcode extension in clion IDE, |
meh, I am not using any VPN/ssr. |
I don't know why, as I'm not familar with js, I don't know how to find reason, so other ide may be a good choice. |
@wnykuang get your point, let me have a check. |
@wnykuang did you use proxy? |
@yihong0618 nope, I didn't change any settings about the internet. Could you open the URL? https://raw.githubusercontent.com/leetcode-tools/leetcode-cli/master/lib/plugins/github.js |
No, but its not the 404 url problem, github.js is the third party plugin which would not install usually, I have tried three different environment but I didn't locate your problem yet. |
@yihong0618 Do you need any more information? |
Yes what my guess is you use vscode-leetcode or leetcode-cli before and installed these third-party plugins maybe you are not notice, am I right? |
@yihong0618 |
@wnykuang |
after Thank you! |
My thinking is that use use third-party github.js and it saves in cache, and this time need to update caused these error. |
@yihong0618 @zry656565 Seems that we need a way to make sure users are in a fresh env when they first use the extension. Like store some flags in the extension's global storage. If it's first time using the extension, clean the cache dir before activate |
My pleasure |
@jdneo @zry656565 for (const plugin of supportedPlugins) {
try { // Check plugin
await this.executeCommandEx(this.nodeExecutable, [await this.getLeetCodeBinaryPath(), "plugin", "-e", plugin]);
} catch (error) { // Download plugin and activate
// popup
await this.executeCommandEx(this.nodeExecutable, [await this.getLeetCodeBinaryPath(), "plugin", "-i", plugin]);
}
} |
This is a good way to handle the error. While we also need a way to eliminate those errors at the first stage. For example, in the |
I noticed it failed due to extension not supporting older vscode-1.36 (june 2019). Make sure vscode up to date (worked on 1.52.1) and try installing again. If problem persists, this can help troubleshoot, download the vsix and in cmd: |
🐛 Bug Report
Extension initialization failed.
To Reproduce
Expected behavior
leetcode-vscode should be ran smoothly.
Extension Output
v12.18.2
[WARN] Installing missing plugins, might take a while ...
[ERROR] HTTP Error: 404
[WARN] Installing missing plugins, might take a while ...
[ERROR] HTTP Error: 404
Error: Command "node "/Users/xxxxxxx/.vscode/extensions/leetcode.vscode-leetcode-0.17.0/node_modules/vsc-leetcode-cli/bin/leetcode",plugin,-i,company" failed with exit code "1".
Your Environment
note:
I believe the problem is caused by the 404 from
https://raw.githubusercontent.com/leetcode-tools/leetcode-cli/master/lib/plugins/github.js
I hope it helps. :D
The text was updated successfully, but these errors were encountered: