vscode 安装使用 leetcode 插件遇到的问题及解决方法

1、

问题:缺少node环境

解决:安装node

2、

问题:登录失败

解决:要启用中国版的leetcode

https://jingyan.baidu.com/article/2c8c281d0b9c0d4009252a57.html

3、

问题:Problem no found !

解决:Add id field to match the problem 

前往leetCode插件路径修改源码:

/Users/用户名/.vscode/extensions/shengchen.vscode-leetcode-0.12.0/node_modules/vsc-leetcode-cli/lib/core.js

const metaFid=file.exist(keyword)?Number(file.meta(keyword).id):NaN;constproblem=problems.find(function(x){returnx.id===keyword||x.fid===keyword||x.name===keyword||x.slug===keyword||x.fid===metaFid;});

重启后生效

https://www.jianshu.com/p/791b30883031

注:如果报路径没有找到之类的错误好像也是修改该段源代码。

4、

问题:The path '~/.leetcode' does not seem to exist anymore on disk.

解决: you can first close your vs code, and then remove the folder: $HOME/.vscode/extensions/shengchen.vscode-leetcode-0.*.*and reinstall the extension again

https://gitter.im/vscode-leetcode/Lobby?at=5d7f18e53cc2b87edf0f8ba0

总结:

我猜测这些问题的根本原因就是

a、我的电脑文件系统有权限,一开始我可能就要执行该命令sudo mount -uw / (加上权限)

b、我一开始的时候没有安装node环境







我的电脑文件系统有权限,一开始我可能就要执行该命令sudo mount -uw / (加上权限)

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容