1

I am trying to set a default org in VScode but it is not working. I get a Cannot read property 'getInstance' of undefined error.

ERROR running force:auth:web:login: Cannot read property 'getInstance' of undefined

Command : sfdx force:auth:web:login --setalias test --instanceurl https://test.salesforce.com --setdefaultusername

Output : ERROR running force:auth:web:login: Cannot read property 'getInstance' of undefined

Can anyone please help with this.

1 Answer 1

1

Usually this kind of issues are due to sfdx updates by salesforce, first step would be to updating SFDX with sfdx update command.

If that doesn't work, try to uninstall the salesforcedx Plug-In with below command and install it again.

sfdx plugins:uninstall salesforcedx

Edit: There is an issue on Salesforce CLI github project which mentions this.

3
  • 1
    This is basically a link-only answer, which may get this answer flagged for deletion. You should at least include the critical details in the answer.
    – sfdcfox
    Aug 24, 2020 at 13:47
  • I was being lazy and have updated the answer, thanks for the heads-up @sfdcfox
    – Raul
    Aug 24, 2020 at 18:13
  • @Raul Thanks, SFDX update didnt work but uninstall and reinstalling did the trick
    – user27749
    Aug 25, 2020 at 0:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .