1

I am running into an issue/error when I am trying to run the sf package install command

I am using the latest @salesforce/cli which is currently 2.20.6 (even tried latest nightly 2.22.1)

It is my only package in my package.json, and I ensured I npm i

  • With a clean node_modules folder
  • Deleted the old package-lock.json file
  • Emptied my npm cache with
    • npm cache clean --force

I am able to run SF commands like sf org create, sf org list and sf org open without issue

When I attempt to run the sf package install sf command I get the following warning and my Salesforce APEX package never installs

Warning: Plugin @salesforce/plugin-packaging (1.16.6) differs from the version specified by sf (1.27.3) TypeError: this.config.plugins.filter is not a function

I am wondering if this is a known issue or if there is a workaround?

The full command I am running is

sf package install --target-org scratchOrg --wait 5 --package %npm_package_config_devPackageId%

This worked before but in newer version this seems to be an issue.

I will attempt to downgrade version of @salesforce/cli in effort to find a stable version for this

  • Version 2.12.9 is the last GA stable release of the @salesforce/cli where the sf package install command worked
  • Version 2.13.9 is the GA stable release of the @salesforce/cli which introduces the issue with sf package install command

Thanks in advanced for your time and knowledge

SF - @salesforce/cli - SF Package Install Broken

Changelog for @salesforce/cli for reference

2
  • 1
    Did you try manually updating the plugin? This happens to me all the time. sf plugins install packaging. Yes it should update itself but I'm finding many times it doesnt. The other fix is here.
    – ddeve
    Dec 8, 2023 at 19:49
  • @ddeve Yes I have tried manually updating to the Latest GA and the Latest Nightly and the same issue persists I found that the command works as expected when I have installed version 2.12.9 of @salessforce/cli though with version 2.13.9 onwards the problem exists. The related fix is for another issue, similar but not the same, though I do appreciate your feedback/input, fingers crossed it gets fixed in future releases. As a workaround I just MANUALLY install the SF APEX package via the URL. Dec 11, 2023 at 13:40

1 Answer 1

0

Try running the command: sf plugins reset

1

You must log in to answer this question.

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