1

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.

SOLUTION: Click the "Environment Variables" button in the lower right corner. Click on "Path" and once selected, click the "Edit..." button. Click "New" and add the variable "C:\Windows\System32". This fixed the issue for me.

  • Hey, I've asked the same question in the success community. I have the same issue : success.salesforce.com/0D53A00004Ao6im – FabienHuot Feb 11 '19 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 '19 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 '19 at 9:16

Browse other questions tagged or ask your own question.