[SalesForce] VSCODE: Unable to Authorize to an ORG

I'm having the same problem. For me, I'm not getting redirected to my salesforce Org. This is what I see in VSCode

12:22:15.474 sfdx force:auth:web:login –setalias DevOrg –instanceurl https://login.salesforce.com –setdefaultusername » Warning: force:auth:web:login is not a sfdx command. Did you mean auth:web:login? [y/n]: » Error: Run sfdx help force for a list of available commands. 12:22:21.923 sfdx force:auth:web:login –setalias DevOrg –instanceurl https://login.salesforce.com –setdefaultusername ended with exit code 127

Salesforce Extension Pack: v50.13.0

Source: Salesforce CLI Integration (Extension)

Best Answer

There is a current regression bug in the Salesforce CLI latest version causing the issue.

For now, you can work around by running below in your vscode terminal

sfdx auth:web:login --setalias DevOrg --instanceurl https://login.salesforce.com --setdefaultusername

Notice that now you need to use sfdx auth:web:login instead of sfdx force:auth:web:login for authorization.