Open usernameisvaibhav opened 4 months ago
After following all cmd. this is returning on passing leetcode version leetcode : File C:\Users\RTX\AppData\Roaming\npm\leetcode.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Spent an hour and figured it out. Here are the step by step instructions by people newbie like me.
Make sure Node.js 8+ is installed. Instructions can be found on the official page
Install leetcode-cli from OS terminal or the terminal within vscode. Installation guide. Note the "From Github" section links to an older version.
Type
leetcode version
in terminal to make sure you installed version 2.6.17+.Log into leetcode.com in a browser. In Chrome, right click and select "Inspect". Switch to tab "Network", "XHR". Then click any button on leetcode.com(now should be on the left split screen). Now you should be able to see the cookie as @yihong0618 showed in the pic. Copy the entire cookie string starting from "__cfduid" and ending with "_gat=1"
Type
leetcode user -c
from terminal within vscode. Follow the prompt and type in your username and cookie you copied above.Originally posted by @wuyifat in https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/478#issuecomment-564757098