skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.64k stars 457 forks source link

中国区登录问题 #232

Open Jeffreyzzj opened 2 years ago

Jeffreyzzj commented 2 years ago

image

Active Name Version Desc

✔ solution.discuss 2019.02.03 Plugin to fetch most voted solution in discussions. ✔ company 2017.12.18 Plugin to query by company for free user. ✔ cache default Plugin to provide local cache. ✔ retry default Plugin to retry last failed request if autologin.enable is on. ✔ leetcode.cn 2018.11.25 Plugin to talk with leetcode-cn APIs. ✔ leetcode default Plugin to talk with leetcode APIs. (node:7118) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) [ERROR] You are not login yet? (node:7119) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:7120) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) login: (node:7121) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) pass: - Signing in leetcode-cn.com [ERROR] invalid password?

中国区登录账户始终提示这个,但是密码没有问题,在浏览器可以使用

PegasusWang commented 2 years ago

https://github.com/skygragon/leetcode-cli-plugins

把 leetcode.cn 插件 js 代码里的 leetcode-cn.com 都改成 leetcode.cn 就可以了。抓取请求发现之前的域名重定向到了leetcode.cn。 如果你等不及 leetcode.cn 插件PR合并 https://github.com/skygragon/leetcode-cli-plugins/pull/49 ,可以先尝试修改:

/usr/local/lib/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.cn.js 批量替换域名为 leetcode.cn,亲测有效

  // config.sys.urls.login             = 'https://leetcode-cn.com/accounts/login/';
  config.sys.urls.login             = 'https://leetcode.cn/accounts/login/';
edte commented 2 years ago

大佬还在使用这个软件吗,原作者没有维护了就很难受,发现了挺多 bug,比如:

  1. expected 的 answer 不显示,一直为空串 image

  2. stdout 的 \n 没有被渲染 image

Li-4 commented 1 year ago

我也遇到这个问题,在arch上使用sudo npm install安装.在第一次启动时候会自动下载插件但是sudo npm,会导致没有写入权限.使用sudo leetcode,来自动下载插件或者克隆下来cp

mbledkowski commented 1 year ago

Hi, developer of this extension has not been very active on GitHub since 2019. I created repository where I keep maintaining similar extension - https://github.com/mbledkowski/neuleetcode.vim. Please submit your issues there.

hiberabyss commented 11 months ago

大佬还在使用这个软件吗,原作者没有维护了就很难受,发现了挺多 bug,比如:

  1. expected 的 answer 不显示,一直为空串 image
  2. stdout 的 \n 没有被渲染 image

我 fork 的版本修复了不输出 expect 的问题