4

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/[email protected]" 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!

0

2 Answers 2

13

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.

2
  • 1
    I did try this but was rejected due to permissions. When I attempted to do sudo npm install --global sfdx-cli a lot of the package update was still permissions denied Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/sfdx-cli/node_modules/dtrace-provider/compile.py' -> '/usr/local/lib/node_modules/sfdx-cli/node_modules/dtrace-provider/binding.gyp' It looks like the sfdx was updated after that run but I am concerned about a lot of the permission denied messages....
    – Olivia
    Commented Jul 23, 2019 at 15:30
  • Would be wiser to reinstalling sfdx cli
    – Raul
    Commented Jul 23, 2019 at 17:42
0

On Windows, if you uninstall the Salesforce CLI, both installer and/or npm version if needed.

If you reinstall the downloaded CLI and still get an error that the CLI is not updatable when running sf update, and you don't want NPM, you need to delete the NPM installation folders.

Run: npm list -g --depth 0 Probable something like c:\Users\youruser\AppData\Roaming\npm and delete all the Salesforce folders.

This will re-enable the sf update command via command line. Enjoy.

You must log in to answer this question.

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