Salesforcedx-vscode: Authorize An Org failed because force:auth:web:login is not a sfdx command

Created on 16 Jan 2021  Â·  10Comments  Â·  Source: forcedotcom/salesforcedx-vscode

Summary

When I was following the instruction in this tutorial: https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce/use-vscode-for-salesforce, the Authenticate to Your Playground step failed. And in the output console I saw

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

I believe it's caused by the new version sfdx cli deprecates the force versions of these commands

Steps To Reproduce:

  1. Install the latest sfdx cli
  2. Install the Salesforce Extension in VSCode
  3. Run SFDX: Authorize an Org in VSCode

Expected result

The org is authorized successfully

Actual result

authorization failed with the error Run sfdx help force for a list of available commands.

Additional information

image

VS Code Version: Version: 1.51.1

SFDX CLI Version: sfdx-cli/7.83.0-eba9c6a927 darwin-x64 node-v12.18.3

OS and version: v50.13.0

Most helpful comment

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/[email protected]"

Got solution here https://github.com/forcedotcom/cli/issues/757#issuecomment-741885504

All 10 comments

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/[email protected]"

Got solution here https://github.com/forcedotcom/cli/issues/757#issuecomment-741885504

Running sfdx update on my mac terminal fixed this issue for me. Thank you @4388331 for the pointer!

Thank you @4388331. I was also facing the error while running the command 'Authorize dev hub' . After running command "sfdx plugin:install @salesforce/[email protected]" on CMD, it worked fine for me.

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/[email protected]"

Got solution here forcedotcom/cli#757 (comment)

This fixed the issue for me as well! Thanks for sharing!

Thanks @4388331 - worked for me as well!

as noted above, latest CLI resolved this.

Thanks @4388331.
You solved my problem.

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/[email protected]"

Got solution here forcedotcom/cli#757 (comment)

Thank you @4388331 ... It works for me :D

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/[email protected]"

Got solution here forcedotcom/cli#757 (comment)

Thanks for the solution. It worked for me.

I had also got the same issue.
First ran "sfdx update" in cmd.

Then ran "sfdx plugin:install @salesforce/[email protected]"
Got the following warning: " Warning: plugin:install is not a sfdx command".

Gave 'y' for the question "Did you mean plugins:install? [y/n]".
And then it worked.

Was this page helpful?
0 / 5 - 0 ratings