[SalesForce] Can Not Update SFDX

I am running into an error when I am trying to update my SFDX version in my cli and I am unsure what it means.

Olivias-MacBook-Pro:test op$ sfdx update ›
Warning: Use "npm update –global sfdx-cli" to update npm-based
installations. sfdx-cli: Updating CLI… not updatable warning
"salesforcedx > force-language-services > @salesforce/command >
@oclif/command@1.5.17" has unmet peer dependency "@oclif/config@^1".
sfdx-cli: Updating plugins… done

When I run any SFDX command I get the message:

› Warning: sfdx-cli update available from 7.1.4 to 7.8.1.

What is this peer dependency? @oclif/config@^1

Any help in updating my SFDX version would be greatly appreciated!

Best Answer

The documentation states:

If You Installed the Salesforce CLI Using the Installer

To install the latest Salesforce CLI version, run:

sfdx update

If You Installed the Salesforce CLI Using npm

The auto-update option is not available. To update the Salesforce CLI using npm, run:

npm install --global sfdx-cli

Seems like you have installed the CLI on you mac from npm, also the warning message suggests to use npm install --global sfdx-cli, could you maybe try that.

Related Topic