4

After updating my Salesforce cli to version @salesforce/cli/2.21.8 win32-x64 node-v20.10.0 and npm 7.19.0 I keep getting the following errors whenever I try to run an sf command:

$ sf --version
(node:2596) Error Plugin: @salesforce/cli: could not find package.json with {
  name: '@oclif/plugin-command-snapshot',
  root: 'C:\\Users\\username\\AppData\\Local\\sf\\client\\2.21.8-474381d',
  type: 'dev'
}
module: @oclif/[email protected]
plugin: @salesforce/cli
root: C:\Users\username\AppData\Local\sf\client\2.21.8-474381d
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2596) Error Plugin: @salesforce/cli: could not find package.json with {
  name: '@salesforce/plugin-release-management',
  root: 'C:\\Users\\username\\AppData\\Local\\sf\\client\\2.21.8-474381d',
  type: 'dev'
}
module: @oclif/[email protected]
plugin: @salesforce/cli
root: C:\Users\username\AppData\Local\sf\client\2.21.8-474381d
See more details with DEBUG=*
@salesforce/cli/2.21.8 win32-x64 node-v20.10.0

As you can see, the command is executing, but why do I keep getting those errors? I opened the package.json file in the path specified in the error, but could not make sense out of it. I don't know much about node nor npm, so any help will be appreciated.

2
  • 1
    Were you able to solve it? I started getting these after installing the cli globally using npm
    – itsmebasti
    Commented Feb 14 at 15:16
  • I have the same error since @salesforce/cli/2.13.9 and it breaks sfpowerkit plugin. All is fine with @salesforce/cli/2.12.9. Did you find a workaround ? Commented Mar 5 at 15:11

1 Answer 1

0

I managed to fix this issue by installing the missing modules one-by-one until the error messages disappeared 😕

2
  • Hi Lior! Did you intall them via NPM? Commented Jun 5 at 8:01
  • If I recall correctly, yes. But I'm afraid I don't remember the specific details. 😔
    – Lior Lavi
    Commented Jun 5 at 11:13

You must log in to answer this question.

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