Salesforce CLI fails with "Error running the Salesforce CLI: .../bin/sfdx: No such file or directory"

Issue #2419 resolved
Scott Wells repo owner created an issue

I’ve now heard about this issue from multiple users. I’m not sure why the CLI is suddenly getting into this state, but a scorched earth reinstall of the CLI does resolve it. That means doing a full uninstall as documented here:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

and then installing the CLI fresh, ideally the latest-and-greatest v2 CLI which seems to be more lightweight and less fragile than in the past.

I’ve reported the growing frequency of this to Salesforce and we’re discussing why this may suddenly be an issue, but as stated above, a completely clean reinstall of the CLI does seem to resolve it.

UPDATE: Salesforce has now determined the root cause of this issue:

https://github.com/forcedotcom/cli/issues/2447

As stated above and in the linked CLI issue, the preferred way to resolve this problem, do a full uninstall of the currently-installed Salesforce CLI, then install the v2 version of the CLI. The v2 CLI fully supports all of the previous sfdx commands including the colon-delimited syntax, so this should not require any changes to existing scripts or other tools that have been built atop the Salesforce CLI’s “historical” calling conventions.

Comments (4)

  1. Log in to comment