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.