function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Devon MorancieDevon Morancie 

SFDX broken

Hi all, I have been having this issue for two days now and I cannot find any fix for it. Everything was running fine a few days ago, I did not run any updates or anything, and then the CLI started giving me this error in VS Code and in command prompt. I have tried uninstalling the CLI and manually deleting all of the leftover folders several times, uninstalling VSC and all extensions, and reinstaling all with no luck. Any ideas?User-added image
Devon MorancieDevon Morancie
Also, forgot to mention, *nothing* works. Not a single SFDX command will work, they all throw this same error. This screenshot was taken from my latest fresh re-installation.
Khan AnasKhan Anas (Salesforce Developers) 
Hi Devon,

Greetings to you!

Try to delete /Users/xxxx/.local/share/sfdx/client and it should resolve itself. 

If the problem persists, delete all the references to the CLI  and install it again. Delete all the references to the CLI with the following commands:
sudo rm -rf /usr/local/sfdx
sudo rm -rf /usr/local/lib/sfdx
sudo rm -rf /usr/local/bin/sfdx
sudo rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx
sudo rm -rf ~/Library/Caches/sfdx

And then install it again:
https://developer.salesforce.com/tools/sfdxcli

Also, you can try to update Node.js to the latest (LTS) and update SFDX.

Reference: https://github.com/heroku/cli/issues/666

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas