Salesforce DX Executable error: Cannot run program "C:/Program Files/Salesforce CLI/bin/sfdx
When I go to Illuminated Cloud > Salesforce DX > Executable and enter "C:/Program Files/Salesforce CLI/bin/sfdx" for the the Salesforce DX executable, after I click OK I see the following error:
Cannot run program "C:/Program Files/Salesforce CLI/bin/sfdx" (in directory "<Project_Directory>"): CreateProcess error=193, %1 is not a valid Win32 application.
where <Project_Directory> is the directory of my project. I use Windows 10 Pro with the latest version (IntelliJ 18.3.1 - Illuminated Cloud 2.0.4.4)
Comments (6)
-
repo owner -
reporter Thanks Scott, I'll follow your instructions. Executing C:\Program Files\Salesforce CLI\bin\sfdx.exe from cmd gives an error because there is no sfdx.exe file in the bin folder, just a file called "sfdx" (latest CLI version). Probably this is the reason of the issue. By the way, CLI works fine from cmd or VS Code.
-
reporter - edited description
-
repo owner Okay, so it sounds like the CLI is installed properly but not at the location configured with Illuminated Cloud. From the Windows command-line please run:
where sfdx
That will tell you where the
sfdx
executable is in your search path. That's the value you want to use when configuring the CLI with Illuminated Cloud.For example, here's what that looks like on my machine:
where sfdx C:\Program Files\sfdx\bin\sfdx.exe
and then here's how it's configured in Illuminated Cloud:
-
reporter where sfdx gave the following results:
C:\Program Files\Salesforce CLI\bin\sfdx C:\Program Files\Salesforce CLI\bin\sfdx.cmd
The former gave an error. The latter (C:\Program Files\Salesforce CLI\bin\sfdx.cmd) works fine! So, my issue is resolved.
Thank you.
-
repo owner - changed status to resolved
Glad to hear! Thanks for letting me know it's resolved for you now.
- Log in to comment
Nikos, let's do two things. First, please enable debug logging for Salesforce DX as documented here:
http://www.illuminatedcloud.com/support/debuglogging
then reproduce the issue and provide the relevant portion of your
idea.log
(Help>Show Log in Explorer) where IC tries to run the SFDX executable and fails.Second, please try the following from the Windows command-line:
C:\Program Files\Salesforce CLI\bin\sfdx.exe
Let's see what results that yields.
For what it's worth, by default the CLI on Windows is installed into
C:\Program Files\sfdx\bin\sfdx.exe
(or at least it was when I installed it...perhaps it's changed based on the rebranding to "Salesforce CLI"?).