Salesforce CLI not working with Visual Studio Code on MAC
Asked Answered
T

2

7

I am not sure where the issue is. I am trying to get the Salesforce CLI and VS Code development flow set up so I can start working, but I am running into basic issues that don't seem to be experienced in the Salesforce provided training and videos. I am on a 2021 Macbook Pro.

I am following the basic [Trailhead tutorial to set up a Salesforce DX Environment and have followed every step below

  1. Install Salesforce CLI
  2. Run 'sfdx' to ensure it works enter image description here
  3. (re)installed Visual Studio Code
  4. Install the Salesforce Extension Pack (current version v51.13.0)
  5. Run Command+Shift+P and type 'sfdx' in the command pallet to confirm that the extension has been installed enter image description here
  6. Successfully run Command+Shift+P and type 'sfdx:: create project'
  7. FAILED to run Command+Shift+P and type 'sfdx: authorize an org' -> Project Default -> enter enter image description here

When I do step 7, I get an error that shows it is attempting to use the Integrate CLI to run the auth command but is followed by 'Salesforce CLI is not installed' enter image description here

When I run the command directly

sfdx force:auth:web:login --setalias lwttest --instanceurl https://login.salesforce.com --setdefaultusername I get the expected flow of a browser opening and having to authorize access. enter image description here

I have been trying to find a solution for 2 days and have had no luck, a lot of issues on the web seem to be for Windows but I am having this issue on a Mac.

  • This is on a company computer
  • I am not on a Corporate firewall, I am using my at home internet
  • I have tested this on a different (personal) Mac and was able to follow the Trailhead without issue

Any help would be appreciated.

Thuja answered 20/5, 2021 at 16:24 Comment(0)
A
0

Seems like c:\Program Files\sf\bin is not in your $PATH - but should be.

Afraid answered 30/7 at 21:15 Comment(0)
L
-3

Try install the CLI from the salesforce developer site

https://developer.salesforce.com/tools/sfdxcli

Lowell answered 28/7, 2021 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.