1

Getting a below error message while using the command "Authorise and Org"

Starting SFDX: Authorize an Org

18:34:11.754 sfdx force:auth:web:login --setalias vscodeOrg --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. 18:34:17.384 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 127

1 Answer 1

7

The error message you got is helpful here, and tells you what to do.

There was recently (October 22, 2020, CLI 7.77.1+, according to the release notes) a change made to the CLI to reorganize some commands. Auth commands now live in their own top-level namespace.

The proper command is now sfdx auth:web:login (no longer in the "force" namespace)

3
  • 1
    extra note: for at least some time, the sfdx force:auth:web:login command will be aliased to the new command. No telling how long that'll be the case though.
    – Derek F
    Commented Jan 16, 2021 at 18:21
  • Thanks Derek for your input :) now how should I change the command because I am using shortcut to trigger the Authorize the Org command by ctrl+shift+p and command gets trigger.
    – Rohan
    Commented Jan 18, 2021 at 17:23
  • @Rohan I encourage you to read the error message and my answer again. In both places, the answer is given. Once again, sfdx auth:web:login is the appropriate command.
    – Derek F
    Commented Jan 18, 2021 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .