5

Last week SFDX stop working to me. In all the instances I have, SFDX force me to reconnect the instance. When I try to reconnect I receive this error: Cannot read property 'getInstance' of undefinedenter image description here

I tryed to update sfdx with de SFDX update command and uninstalling and installing again the Salesforce CLI.

I remove all extensions and installing again (Salesforce extension pack) and to finish I uninstall the Visual Code too. Always the same error.

can anybody help me, please?

2
  • 3
    I have experienced a similar issue in the past. When trying to do any sfdx command such as sfdx force:alias:list, I received the error "Cannot read property 'getInstance' of undefined" and ~/.sfdx/sfdx.log said "The config file: /.sfdx/sfdx-project.json is not schema valid\nDue to: Validation errors:\nshould have required property 'packageDirectories'". I did sfdx plugins:uninstall salesforcedx and my problem was gone. Aug 17 '20 at 9:35
  • Anudeep's recommendation worked for me and doesn't seem to have any negative side effects. Aug 30 '20 at 3:45
3
  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
1
  • Came across this issue today. This solution worked for me. (Just running sfdx plugins:uninstall salesforcedx did not solve the problem.
    – Brand0R
    Jan 22 at 16:56
1

I resolved this by running sfdx plugins:uninstall salesforcedx

This solution came from here, apparently salesforcedx plugin is part of the core CLI plugins, so you don't have to have it installed separately. This solution is much less painful than having to reinstall everything again.

0

I solved the problem following the steps of this link: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

Hope this help other people.

1
  • While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – identigral
    Sep 1 '20 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.