I am trying to learn about Salesforce DX (Developer Experience). For most of the salesforce DX tasks, we require using salesforce command line interface such as authorization, creating scratch org. etc. But I am getting this error message:

Error: 'sfdx' is not recognized as an internal or external command, operable program or batch file

How can I fix it?

  • 4
    Sounds like the folder in which you have your executable is not in your PATH environment variable – Rob Cowell Mar 9 '17 at 14:06
  • Can you please tell me the steps to configure Salesforce Dx. For ex. which executale file is required. – amit patil Mar 10 '17 at 4:51
  • You'd have to read the official documentation - as it is only in developer preview, I don't have access to it to verify the steps. – Rob Cowell Mar 10 '17 at 8:49
  • 2
    Pilot or Preview features that are closed should not be asked on SFSE. Instead these questions should be directed to the product team who normally have an avenue of support for anyone in the pilot or preview program. Also, the chances of the same problem happening once generally available is quite small, meaning this question is unlikely to benefit people after the fact. – pchittum May 11 '17 at 19:25

It depends on how you installed SFDX. You have multiple options. The easiest one is, as @Pranay said, to access the official build and just install it using the provided installer: https://developer.salesforce.com/tools/sfdxcli

On the other hand, you can also install SFDX as an npm package, if you're used to work with the Node environment: https://www.npmjs.com/package/sfdx-cli

Furthermore, take into account that if you are using Windows with the Linux subsystem installed, you will not be able to access the SFDX CLI from the Bash if you installed it in windows, or the other way around, so you would have to install it in both places, or just where you'll be working.

Once you've installed the CLI remember to also open a new instance of the console (at least in Windows), otherwise it won't recognize the commands.


1.Verify the "Salesforce CLI" installed successfully or not

Go to → C:\Program Files\Salesforce CLI\bin → Verify sfdx.exe should be availble

2.Add this path to environment variables "Path" Go To → Windows Search → Edit environment variables for your account enter image description here

Regards https://deepikamatam.blogspot.com


You need to install Force.com CLI for SFDX. Use the below link. https://developer.salesforce.com/tools/sfdxcli

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.