Recently I came upon an error which I cannot resolve. I have searched through google and did not manage to find the answer.

I have installed salesforce CLI and when typing the command:

  • in terminal: sfdx force:auth:web:login and its variations ( with parameters )
  • in visual studio code from command palette: Authorize an org

I get the error:

ENOENT: spawn cmd ENOENT

I am not able to interpret this error message. It seems that other salesforce commands are working well.

I tried reinstalling the CLI but it didn't solve the error. Using Windows.

  • Hey, I've asked the same question in the success community. I have the same issue : success.salesforce.com/0D53A00004Ao6im – FabienHuot Feb 11 at 15:41
  • are you behind the proxy? set the environment variable to bypass it. After that, it will work fine – sanket kumar Feb 11 at 19:45
  • Just an information for others that might be struggling with similiar issue. It turned out that some entries in PATH were missing. We did compare user64574 env variables with working setup and it did work. As user64574 pointed out before (in del answer) without this PATH settings auth command was working only in Windows' System32 directory. – neff Feb 20 at 9:16

protected by Community Mar 14 at 12:55

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Browse other questions tagged or ask your own question.