Quick Background: I am fairly new to VS Code and LWCs. I've been working on a LWC and deploying to a sandbox (we'll call it GSB), then using change sets to push to prod. I recently refreshed the sandbox and I could no longer deploy to GSB. I assume this is to be expected, since the password changed in GSB as part of the refresh. No problem, I'll just reauthorize the org.

Problem: This is where the issue is. I can't authorize a sandbox (after a refresh) to deploy code because VS Code doesn't seem to recognize any sfdx commands, even though SF CLI and all extensions are installed.

Right now when I try to authorize an org, the error in the Output section at the bottom is: "Starting SFDX: Authorize an Org

07:35:27.444 sfdx org:login:web --alias SB1 --instance-url https://test.salesforce.com 
is not recognized as an internal or external command,
operable program or batch file.
07:35:27.466 sfdx org:login:web --alias SB1 --instance-url https://test.salesforce.com --set-default

I've tried disabling and uninstalling the extensions (including the CLI), updating to most recent CLI version, uninstalling and reinstalling VS Code, closing & restarting, reviewing other similar questions here, but I have not yet been able to get it to work. In fact none of the SFDX commands seem to work right now. They all get the same "not recognized..." error.

Question: Any ideas on what else to try to resolve this issue?

2 Answers 2


As with many VSCode/CLI issues, this was eventually resolved by removing and reinstalling everything. I had read plenty of posts saying to reinstall the CLI and update to the newest version, and I had done so without luck. I had also un/re installed VS Code, but it hadn't worked until I, as a coworker put it, "nuked everything" (except my actual projects, of course) and started from scratch. More specifically, what I did was:

  • Uninstall Salesforce CLI
  • Uninstall all VS Code extensions
  • Uninstall VS Code
  • Delete all .sf and .sfdx directories in C:\Users\myusername
  • Delete any remainders of VSC anywhere I could find them
  • Reinstall everything

I'm not sure which of those pieces solved the issue but something did.

  • This happened to me recently as well, it seems Salesforce is pushing to get out of sfdx v7 and random features stop working unless you uninstall everything sfdx related and install sf v2. developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/… Commented Jan 2 at 19:20
  • Thanks Dan. Yeah a coworker sent me that link and that's what prompted me to start from scratch. Commented Jan 3 at 15:53

Remove folder '7.209.6-8ba3197'. To find the folder check below path. After the removal of the folder run the sfdx command once again.


You must log in to answer this question.

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