Harshad Kumbhar
Harshad Kumbhar

Reputation: 391

Cannot read property 'getInstance' of undefined in Salesforce CLI while deploy and retrieve command

VSCode is using for Salesforce development and couple of days back this issue is started whenever I am try to Deploy and retrieve changes from Org to my VScode Connected org. It is throwing Error Cannot read property 'getInstance' of undefined. Can anyone please help to resolve this.

Upvotes: 0

Views: 1183

Answers (2)

Asif
Asif

Reputation: 1

1- Uninstall Salesforce CLI

2- Go to windows explorer and use this path "%LOCALAPPDATA%\sfdx"

3- Delete all the files from there

4- Reinstall Salesforce CLI

Upvotes: 0

Harshad Kumbhar
Harshad Kumbhar

Reputation: 391

I am able to resolve by uninstalling and reinstalling the Salesforce CLI from installed program on machine.

  1. Uninstall Salesforce CLI from installed program. Do not do it through VSCode.
  2. Download exe again from Salesforce https://developer.salesforce.com/tools/sfdxcli and install again.

Upvotes: 0

Related Questions