Member-only story
Authorize An Org failed because force:auth:web:login is not a sfdx command
Feb 7, 2021
While setting up VS code for LWC there are many steps to follow.
after creating a project next step is to connect VScode with the playground org.
Run SFDX: Authorize an Org
in VSCode is the command to connect with the org.
Issue
Issue while running SFDX: Authorize an Org
command.
Starting SFDX: Authorize an Org
15:23:41.710 sfdx force:auth:web:login --setalias VSCodePlayground --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.
15:23:47.396 sfdx force:auth:web:login --setalias VSCodePlayground --instanceurl https://login.salesforce.com --setdefaultusername
ended with exit code 127
Solution
Followed two steps to solve the issue & Run this command in terminal/command line.
- sfdx update — Update salesforce CLI
- sfdx plugins:install @salesforce/plugin-auth@1.4.3 — Install Plugin
Done !!
Reference: https://github.com/forcedotcom/salesforcedx-vscode/issues/2869
Happy Coding :)